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 74c6ce67bb..03add8e9f6 100644
--- a/core/core-frontend/src/custom-component/v-query/Component.vue
+++ b/core/core-frontend/src/custom-component/v-query/Component.vue
@@ -297,6 +297,11 @@ const resetData = () => {
next.defaultValue = next.multiple || +next.displayType === 7 ? [] : undefined
}
next.selectValue = Array.isArray(next.defaultValue) ? [...next.defaultValue] : next.defaultValue
+ if (next.optionValueSource === 1 && next.defaultMapValue?.length) {
+ next.mapValue = Array.isArray(next.defaultMapValue)
+ ? [...next.defaultMapValue]
+ : next.defaultMapValue
+ }
const keyList = Object.entries(next.checkedFieldsMap)
.filter(ele => next.checkedFields.includes(ele[0]))
.filter(ele => !!ele[1])
@@ -309,6 +314,9 @@ const resetData = () => {
const clearData = () => {
;(list.value || []).reduce((pre, next) => {
next.selectValue = next.multiple || +next.displayType === 7 ? [] : undefined
+ if (next.optionValueSource === 1 && next.defaultMapValue?.length) {
+ next.mapValue = next.multiple ? [] : undefined
+ }
const keyList = Object.entries(next.checkedFieldsMap)
.filter(ele => next.checkedFields.includes(ele[0]))
.filter(ele => !!ele[1])
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 2e12e7e5ed..77c5c9853e 100644
--- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue
+++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue
@@ -545,6 +545,7 @@ const validate = () => {
const handleBeforeClose = () => {
inputCom.value?.mult?.handleClickOutside?.()
+ inputCom.value?.single?.handleClickOutside?.()
handleDialogClick()
dialogVisible.value = false
visiblePopover.value = false
@@ -553,6 +554,8 @@ const handleBeforeClose = () => {
const confirmClick = () => {
if (validate()) return
inputCom.value?.mult?.handleClickOutside?.()
+ inputCom.value?.single?.handleClickOutside?.()
+ handleDialogClick()
visiblePopover.value = false
dialogVisible.value = false
conditions.value.forEach(ele => {
@@ -782,7 +785,7 @@ const handleDialogClick = () => {
const operators = [
{
- label: '精准匹配',
+ label: '精确匹配',
value: 'eq'
},
{
@@ -1570,7 +1573,6 @@ defineExpose({
@@ -1594,7 +1596,6 @@ defineExpose({
@@ -2220,7 +2221,7 @@ defineExpose({
.value {
width: 321px;
.condition-type {
- margin-top: 8px;
+ margin-top: 3px !important;
display: flex;
position: relative;
.ed-input__wrapper {
@@ -2272,7 +2273,7 @@ defineExpose({
opacity: 0.3;
position: absolute;
right: 5px;
- bottom: 5px;
+ bottom: 3px;
width: 220px;
z-index: 10;
diff --git a/core/core-frontend/src/custom-component/v-query/Select.vue b/core/core-frontend/src/custom-component/v-query/Select.vue
index 7b447292dc..b53e5f1fc4 100644
--- a/core/core-frontend/src/custom-component/v-query/Select.vue
+++ b/core/core-frontend/src/custom-component/v-query/Select.vue
@@ -303,6 +303,7 @@ watch(
watch(
[() => config.value.checkedFields, () => config.value.checkedFieldsMap],
() => {
+ if (!props.isConfig) return
debounceOptions(config.value.optionValueSource)
},
{
@@ -385,6 +386,7 @@ const selectStyle = computed(() => {
})
const mult = ref()
+const single = ref()
onBeforeMount(() => {
init()
@@ -392,7 +394,8 @@ onBeforeMount(() => {
defineExpose({
displayTypeChange,
- mult
+ mult,
+ single
})
@@ -425,6 +428,7 @@ defineExpose({
v-loading="loading"
@change="handleValueChange"
clearable
+ ref="single"
:style="selectStyle"
filterable
radio
diff --git a/core/core-frontend/src/custom-component/v-query/TextSearch.vue b/core/core-frontend/src/custom-component/v-query/TextSearch.vue
index eb81b8dece..ed2f13fac7 100644
--- a/core/core-frontend/src/custom-component/v-query/TextSearch.vue
+++ b/core/core-frontend/src/custom-component/v-query/TextSearch.vue
@@ -14,7 +14,7 @@ interface SelectConfig {
const operators = [
{
- label: '精准匹配',
+ label: '精确匹配',
value: 'eq'
},
{
@@ -143,7 +143,7 @@ onBeforeMount(() => {
opacity: 0.3;
position: absolute;
right: 5px;
- bottom: 5px;
+ bottom: 3px;
width: 195px;
z-index: 10;
diff --git a/core/core-frontend/src/hooks/web/useFilter.ts b/core/core-frontend/src/hooks/web/useFilter.ts
index a6af320df8..3c678c1ea8 100644
--- a/core/core-frontend/src/hooks/web/useFilter.ts
+++ b/core/core-frontend/src/hooks/web/useFilter.ts
@@ -84,9 +84,10 @@ const getValueByDefaultValueCheckOrFirstLoad = (
multiple: boolean,
defaultMapValue: any,
optionValueSource: number,
- mapValue: any
+ mapValue: any,
+ displayType: string
) => {
- if (optionValueSource === 1) {
+ if (optionValueSource === 1 && defaultMapValue?.length && ![1, 7].includes(+displayType)) {
if (firstLoad) {
return defaultValueCheck ? defaultMapValue : multiple ? [] : ''
}
@@ -181,7 +182,7 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
item.checkedFields.includes(curComponentId) &&
item.checkedFieldsMap[curComponentId]
) {
- let selectValue = ''
+ let selectValue
const {
selectValue: value,
timeGranularityMultiple,
@@ -210,6 +211,14 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
multiple
} = item
+ console.log(
+ 'displayType',
+ timeType === 'dynamic',
+ [1, 7].includes(+displayType),
+ firstLoad,
+ curComponentId
+ )
+
if (timeType === 'dynamic' && [1, 7].includes(+displayType) && firstLoad) {
if (+displayType === 1) {
selectValue = getDynamicRange(item)
@@ -249,6 +258,7 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
)
item.defaultValue = [startTime, endTime]
item.selectValue = [startTime, endTime]
+ selectValue = [startTime, endTime]
}
} else if (displayType === '8') {
selectValue = getResult(
@@ -268,7 +278,8 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa
multiple,
defaultMapValue,
optionValueSource,
- mapValue
+ mapValue,
+ displayType
)
}
if (
diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/FieldMore.vue b/core/core-frontend/src/views/visualized/data/dataset/form/FieldMore.vue
index 7a3b0a327d..6eda0d4dfb 100644
--- a/core/core-frontend/src/views/visualized/data/dataset/form/FieldMore.vue
+++ b/core/core-frontend/src/views/visualized/data/dataset/form/FieldMore.vue
@@ -120,7 +120,9 @@ const handleChange = () => {
{