From 8c605f85fc5b3297aa69e7d574d1a10235caa96c Mon Sep 17 00:00:00 2001 From: Jay <csj123456> Date: 星期六, 12 十月 2024 15:17:31 +0800 Subject: [PATCH] 修改itemid --- src/views/data/ind/item/DerIndDefineForm.vue | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/views/data/ind/item/DerIndDefineForm.vue b/src/views/data/ind/item/DerIndDefineForm.vue index 9b97465..f5b4235 100644 --- a/src/views/data/ind/item/DerIndDefineForm.vue +++ b/src/views/data/ind/item/DerIndDefineForm.vue @@ -95,7 +95,7 @@ </el-col> <el-col :span="6"> <el-form-item label="时间限定" prop="timeLimit"> - <el-select v-model="formData.timeLimit" placeholder="请选择" + <el-select v-model="formData.derItem.timeLimit" placeholder="请选择" @change="handleTimeLimitChange($event)"> <el-option v-for="dict in getStrDictOptions(DICT_TYPE.IND_TIME_LIMIT)" @@ -238,8 +238,12 @@ 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) + if(formData.value.derItem.dimension.length > 0){ + formData.value.derItem.dimension = formData.value.derItem.dimension.split(',') + }else { + formData.value.derItem.dimension = "" + } + await handleChange(formData.value.derItem.atomItemId) } finally { formLoading.value = false } @@ -258,13 +262,15 @@ formLoading.value = true try { formData.value.itemType = 'DER' - formData.value.derItem.atomItemId = formData.value.atomItem.id + formData.value.derItem.atomItemId = formData.value.atomItem.itemId if(formData.value.derItem.dimension.length > 0){ let dimension = '' for (let index in formData.value.derItem.dimension){ dimension = dimension + formData.value.derItem.dimension[index] + ',' } formData.value.derItem.dimension = dimension.substring(0, dimension.length - 1) + }else{ + formData.value.derItem.dimension = '' } const data = formData.value as ItemApi.ItemVO if (formType.value === 'create') { @@ -314,9 +320,10 @@ async function handleChange(event) { if (event !== null && event !== undefined) { const itemData = await ItemApi.getItem(event) + let a = itemData.atomItem.id + formData.value.atomItem.id = a formData.value.atomItem.itemName = itemData.itemName - formData.value.atomItem.id = itemData.atomItem.id - formData.value.atomItem.itemId = itemData.id + formData.value.atomItem.itemId = itemData.atomItem.itemId const queryParams = reactive({ dataSetId: itemData.atomItem.dataSet, }) -- Gitblit v1.9.3