src/views/data/ind/item/DerIndDefineForm.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/data/ind/item/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/data/ind/item/DerIndDefineForm.vue
@@ -7,14 +7,14 @@ :rules="formRules" label-width="100px"> <el-row> <el-col :span="12"> <el-form-item label="原子指标" prop="atomItem.id"> <el-select v-model="selected" clearable placeholder="请选择原子指标" <el-form-item label="原子指标" prop="atomItem.itemId"> <el-select v-model="formData.atomItem.itemId" clearable placeholder="请选择原子指标" @change="handleChange($event)"> <el-option v-for="item in atomItemList" :key="item.id" :label="item.itemNo" :value="item.id" :value="item.id + ''" /> </el-select> </el-form-item> @@ -187,6 +187,7 @@ timeGranularity: '', atomItem: { id: '', itemId: '', itemNo: '', itemName: '', }, @@ -198,9 +199,6 @@ timeEnd: '', dimension: '' } }) const queryParams = ref({ itemType: 'ATOM' }) const validateAsNumber = (rule, value, callback) => { @@ -218,9 +216,7 @@ /*"atomItem.id": [{required: true, message: '原子指标不能为空', trigger: 'blur'}]*/ }) const formRef = ref() // 表单 Ref const dataSourceList = ref([] as DataSourceConfigApi.DataSourceConfigVO[]) const atomItemList = ref([] as ItemApi.ItemVO[]) const selected = ref(null) const showTimeChange = ref(false) const dataCategoryList = ref([] as CategoryApi.IndItemCategoryVO[]) const dataSetFieldList = ref([] as DataSetFieldApi.DataSetFieldVO[]) @@ -233,13 +229,17 @@ resetForm() // 加载数据源列表 dataCategoryList.value = await CategoryApi.getCategoryListAllSimple() const queryParams = reactive({ itemType: 'ATOM' }) atomItemList.value = await ItemApi.getItemList(queryParams) selected.value = null // 修改时,设置数据 if (id) { formLoading.value = true try { formData.value = await ItemApi.getItem(id) formData.value.derItem.dimension = formData.value.derItem.dimension.split(',') await handleChange(formData.value.atomItem.itemId) } finally { formLoading.value = false } @@ -316,6 +316,7 @@ const itemData = await ItemApi.getItem(event) formData.value.atomItem.itemName = itemData.itemName formData.value.atomItem.id = itemData.atomItem.id formData.value.atomItem.itemId = itemData.id const queryParams = reactive({ dataSetId: itemData.atomItem.dataSet, }) src/views/data/ind/item/index.vue
@@ -3,13 +3,23 @@ <ContentWrap> <el-form ref="queryFormRef" :inline="true" :model="queryParams" class="-mb-15px" label-width="68px"> <el-form-item label="指标编码" prop="name"> <el-input v-model="queryParams.itemNo" class="!w-240px" clearable placeholder="请输入指标编码" <el-form-item label="指标编码" prop="itemNo"> <el-input v-model="queryParams.itemNo" class="!w-200px" clearable placeholder="请输入指标编码" @keyup.enter="handleQuery"/> </el-form-item> <el-form-item label="指标名称" prop="name"> <el-input v-model="queryParams.itemName" class="!w-240px" clearable placeholder="请输入指标名称" <el-form-item label="指标名称" prop="itemName"> <el-input v-model="queryParams.itemName" class="!w-200px" clearable placeholder="请输入指标名称" @keyup.enter="handleQuery"/> </el-form-item> <el-form-item label="指标类型" prop="itemType"> <el-select v-model="queryParams.itemType" class="!w-200px" clearable placeholder="请选择指标类型"> <el-option v-for="dict in getStrDictOptions(DICT_TYPE.IND_ITEM_TYPE)" :key="dict.value" :label="dict.label" :value="dict.value" /> </el-select> </el-form-item> <el-form-item> <el-button @click="handleQuery"> @@ -93,7 +103,7 @@ </template> <script lang="ts" setup> import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import * as DataSetApi from '@/api/data/ind/data/data.set' import AtomIndDefineForm from './AtomIndDefineForm.vue'