From 1f375577b9e5d6e89aa4d70c526db88eeb95c9a0 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期四, 16 一月 2025 14:41:53 +0800 Subject: [PATCH] 原子指标输入验证 --- src/views/data/ind/item/AtomIndDefineForm.vue | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/views/data/ind/item/AtomIndDefineForm.vue b/src/views/data/ind/item/AtomIndDefineForm.vue index 32096ed..ed6741a 100644 --- a/src/views/data/ind/item/AtomIndDefineForm.vue +++ b/src/views/data/ind/item/AtomIndDefineForm.vue @@ -61,7 +61,7 @@ </el-col> </el-row> <el-row> - <el-col :span="6"> + <el-col :span="12"> <el-form-item label="数据集" prop="atomItem.dataSet"> <el-select v-model="formData.atomItem.dataSet" clearable placeholder="请选择数据集" @change="handleDataSetChange($event)"> <el-option @@ -86,8 +86,8 @@ </el-form-item> </el-col> <el-col :span="6"> - <el-form-item label="统计方式" prop="statFunc"> - <el-select v-model="formData.atomItem.statFunc" placeholder="请选择"> + <el-form-item label="统计方式" prop="atomItem.statFunc"> + <el-select v-model="formData.atomItem.statFunc" clearable placeholder="请选择"> <el-option v-for="dict in getStrDictOptions(DICT_TYPE.DATA_STAT_FUNC)" :key="dict.value" @@ -157,12 +157,8 @@ const formRules = reactive({ itemName: [{required: true, message: '指标名称不能为空', trigger: 'blur'}], itemCategory: [{required: true, message: '指标分类不能为空', trigger: 'blur'}], - /*precision: [{validator: validateAsNumber, trigger: 'blur' }], - coefficient: [{validator: validateAsNumber, trigger: 'blur' }], - statFunc: [{required: true, message: '统计方式不能为空', trigger: 'blur'}], - timeGranularity: [{required: true, message: '时间粒度不能为空', trigger: 'blur'}], - "atomItem.dataSet": [{required: true, message: '数据集不能为空', trigger: 'blur'}], - "atomItem.usingField":[{required: true, message: '使用字段不能为空', trigger: 'blur'}]*/ + "atomItem.usingField": [{required: true, message: '使用字段不能为空', trigger: 'blur'}], + "atomItem.statFunc": [{required: true, message: '统计方式不能为空', trigger: 'blur'}], }) const formRef = ref() // 表单 Ref const dataSetList = ref([] as DataSetApi.DataSetVO[]) -- Gitblit v1.9.3