diff --git a/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue b/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue
new file mode 100644
index 0000000000..00dba34bfc
--- /dev/null
+++ b/core/core-frontend/src/custom-component/v-query/ConditionDefaultConfiguration.vue
@@ -0,0 +1,705 @@
+getLastStart
+
+
+
+
+
设置默认值
+
+
+
+
{{ curComponent.conditionType === 1 ? '与' : '或' }}
+
+
+
+
+
+
+
+
+
+
+
选项类型
+
+ multipleChange(val as boolean, true)"
+ v-model="multiple"
+ >
+ {{ t('visualization.single_choice') }}
+ {{ t('visualization.multiple_choice') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置
+
+
+
+
+ 已配置
+
+
+
+
+
+
+
+
+
+
+ 固定时间
+ 动态时间
+
+
+
+
+
+
+
+
+
开始时间
+
+
+
+
+
+
+
+
+
+
+
+
+
结束时间
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue
index 8074a95152..79bf179229 100644
--- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue
+++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue
@@ -34,11 +34,12 @@ import draggable from 'vuedraggable'
import RangeFilterTime from './RangeFilterTime.vue'
import type { ManipulateType } from 'dayjs'
import dayjs from 'dayjs'
+import ConditionDefaultConfiguration from '@/custom-component/v-query/ConditionDefaultConfiguration.vue'
const { t } = useI18n()
const dvMainStore = dvMainStoreWithOut()
const { componentData, canvasViewInfo } = storeToRefs(dvMainStore)
-
+const defaultConfigurationRef = ref(null)
interface DatasetField {
type?: string
innerType?: string
@@ -146,11 +147,6 @@ const { queryElement } = toRefs(props)
const getDetype = (id, arr) => {
return arr.flat().find(ele => ele.id === id)?.deType
}
-const visiblePopover = ref(false)
-const handleVisiblePopover = ev => {
- ev.stopPropagation()
- visiblePopover.value = !visiblePopover.value
-}
const showConfiguration = computed(() => {
if (!curComponent.value) return false
if (!curComponent.value.checkedFields?.length) return false
@@ -315,7 +311,7 @@ const timeParameterList = computed(() => {
})
const cancelClick = () => {
- visiblePopover.value = false
+ handleDialogClick()
dialogVisible.value = false
}
@@ -353,24 +349,7 @@ const handleValueSourceChange = () => {
}
const multipleChange = (val: boolean, isMultipleChange = false) => {
- if (isMultipleChange) {
- curComponent.value.defaultValue = val ? [] : undefined
- }
- const { defaultValue } = curComponent.value
- if (Array.isArray(defaultValue)) {
- curComponent.value.selectValue = val ? defaultValue : undefined
- } else {
- curComponent.value.selectValue = val
- ? defaultValue !== undefined
- ? [defaultValue]
- : []
- : defaultValue
- }
- if (curComponent.value.field.deType === 1) {
- curComponent.value.multiple = val
- return
- }
- curComponent.value.multiple = val
+ defaultConfigurationRef.value?.multipleChange(val, isMultipleChange)
}
const isInRange = (ele, startWindowTime, timeStamp) => {
@@ -675,7 +654,6 @@ const handleBeforeClose = () => {
inputCom.value?.single?.handleClickOutside?.()
handleDialogClick()
dialogVisible.value = false
- visiblePopover.value = false
}
const confirmClick = () => {
@@ -683,7 +661,6 @@ const confirmClick = () => {
inputCom.value?.mult?.handleClickOutside?.()
inputCom.value?.single?.handleClickOutside?.()
handleDialogClick()
- visiblePopover.value = false
dialogVisible.value = false
conditions.value.forEach(ele => {
curComponent.value = ele
@@ -941,7 +918,7 @@ const showError = computed(() => {
return (optionValueSource === 1 && !field.id) || (optionValueSource === 2 && !valueSource.length)
})
const handleDialogClick = () => {
- visiblePopover.value = false
+ defaultConfigurationRef.value?.handleDialogClick()
}
const operators = [
@@ -1752,284 +1729,10 @@ defineExpose({
-
-
设置默认值
-
-
-
-
{{
- curComponent.conditionType === 1 ? '与' : '或'
- }}
-
-
-
-
-
-
-
-
-
-
-
选项类型
-
- multipleChange(val as boolean, true)"
- v-model="multiple"
- >
- {{ t('visualization.single_choice') }}
- {{ t('visualization.multiple_choice') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 设置
-
-
-
-
- 已配置
-
-
-
-
-
-
-
-
-
-
- 固定时间
- 动态时间
-
-
-
-
-
-
-
-
-
开始时间
-
-
-
-
-
-
-
-
-
-
-
-
-
结束时间
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+