From c652f91b67754e7669a9fd6d5100b85363793ac0 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Mon, 28 Oct 2024 10:59:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6=E7=BA=A7=E8=81=94=E7=9A=84?= =?UTF-8?q?=E7=BA=A7=E8=81=94=E7=8A=B6=E6=80=81=E4=B8=8D=E8=83=BD=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=20#12885?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/v-query/Component.vue | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue index 2ec329205c..f16f007655 100644 --- a/core/core-frontend/src/custom-component/v-query/Component.vue +++ b/core/core-frontend/src/custom-component/v-query/Component.vue @@ -441,6 +441,11 @@ const resetData = () => { next.conditionValueS = next.defaultConditionValueS next.conditionValueOperatorS = next.defaultConditionValueOperatorS + if (next.displayType === '22') { + next.numValueEnd = next.defaultNumValueEnd + next.numValueStart = next.defaultNumValueStart + } + if (!next.defaultValueCheck) { next.defaultValue = next.multiple || +next.displayType === 7 ? [] : undefined } @@ -450,6 +455,21 @@ const resetData = () => { ? [...next.defaultMapValue] : next.defaultMapValue } + + ;(props.element.cascade || []).forEach(ele => { + ele.forEach(item => { + const comId = item.datasetId.split('--')[1] + console.log('comId', comId) + + if (next.id === comId) { + item.currentSelectValue = Array.isArray(next.selectValue) + ? next.selectValue + : [next.selectValue] + useEmitt().emitter.emit(`${item.datasetId.split('--')[1]}-select`) + } + }) + }) + const keyList = Object.entries(next.checkedFieldsMap) .filter(ele => next.checkedFields.includes(ele[0])) .filter(ele => !!ele[1]) @@ -461,6 +481,14 @@ const resetData = () => { } const clearData = () => { + ;(props.element.cascade || []).forEach(ele => { + ele.forEach(item => { + if (item.currentSelectValue?.length) { + useEmitt().emitter.emit(`${item.datasetId.split('--')[1]}-select`) + item.currentSelectValue = [] + } + }) + }) ;(list.value || []).reduce((pre, next) => { next.selectValue = next.multiple || +next.displayType === 7 ? [] : undefined if (next.optionValueSource === 1 && next.defaultMapValue?.length) { @@ -468,6 +496,11 @@ const clearData = () => { } next.conditionValueF = '' next.conditionValueS = '' + + if (next.displayType === '22') { + next.numValueEnd = undefined + next.numValueStart = undefined + } const keyList = Object.entries(next.checkedFieldsMap) .filter(ele => next.checkedFields.includes(ele[0])) .filter(ele => !!ele[1])