diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue
index aff9c85345..53705370db 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue
@@ -80,11 +80,11 @@ const onChangeYAxisForm = (val, prop) => {
}
const onIndicatorChange = (val, prop) => {
- batchOptChange('customAttr', 'indicator', val, prop)
+ batchOptChange('customAttr', 'indicator', val.indicatorValue, prop)
}
const onIndicatorNameChange = (val, prop) => {
- batchOptChange('customAttr', 'indicatorName', val, prop)
+ batchOptChange('customAttr', 'indicatorName', val.indicatorName, prop)
}
const onChangeMiscStyleForm = (val, prop) => {
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorNameSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorNameSelector.vue
index e1996c19ca..6ed34677a4 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorNameSelector.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorNameSelector.vue
@@ -12,9 +12,12 @@ import { cloneDeep, defaultsDeep } from 'lodash-es'
import { ElIcon } from 'element-plus-secondary'
import Icon from '@/components/icon-custom/src/Icon.vue'
import { hexColorToRGBA } from '@/views/chart/components/js/util'
+import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
+import { storeToRefs } from 'pinia'
const { t } = useI18n()
-
+const dvMainStore = dvMainStoreWithOut()
+const { batchOptStatus } = storeToRefs(dvMainStore)
const props = defineProps({
chart: {
type: Object,
@@ -92,7 +95,9 @@ onMounted(() => {
watch(
() => props.chart?.customAttr?.indicatorName,
() => {
- init()
+ if (!batchOptStatus.value) {
+ init()
+ }
},
{ deep: true }
)
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorValueSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorValueSelector.vue
index b5cccfde6c..bc5a6c5d1a 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorValueSelector.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorValueSelector.vue
@@ -12,6 +12,10 @@ import { cloneDeep, defaultsDeep } from 'lodash-es'
import { ElIcon, ElInput } from 'element-plus-secondary'
import Icon from '@/components/icon-custom/src/Icon.vue'
import { hexColorToRGBA } from '@/views/chart/components/js/util'
+import { storeToRefs } from 'pinia'
+import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
+const dvMainStore = dvMainStoreWithOut()
+const { batchOptStatus } = storeToRefs(dvMainStore)
const { t } = useI18n()
@@ -53,7 +57,8 @@ const fontSizeList = computed(() => {
return arr
})
-const changeTitleStyle = prop => {
+const changeLabelTitleStyleStyle = prop => {
+ console.log('changeLabelTitleStyleStyle===' + prop)
emit('onIndicatorChange', state.indicatorValueForm, prop)
}
@@ -95,7 +100,9 @@ onMounted(() => {
watch(
() => props.chart?.customAttr?.indicator,
() => {
- init()
+ if (!batchOptStatus.value) {
+ init()
+ }
},
{ deep: true }
)
@@ -125,7 +132,7 @@ defineExpose({ getFormData })
:effect="themes"
v-model="state.indicatorValueForm.fontFamily"
:placeholder="t('chart.font_family')"
- @change="changeTitleStyle('fontFamily')"
+ @change="changeLabelTitleStyleStyle('fontFamily')"
>
@@ -156,7 +163,7 @@ defineExpose({ getFormData })
v-model="state.indicatorValueForm.fontSize"
:placeholder="t('chart.text_fontsize')"
size="small"
- @change="changeTitleStyle('fontSize')"
+ @change="changeLabelTitleStyleStyle('fontSize')"
>
@@ -196,7 +203,7 @@ defineExpose({ getFormData })
:effect="themes"
class="icon-checkbox"
v-model="state.indicatorValueForm.isBolder"
- @change="changeTitleStyle('isBolder')"
+ @change="changeLabelTitleStyleStyle('isBolder')"
>
@@ -219,7 +226,7 @@ defineExpose({ getFormData })
:effect="themes"
class="icon-checkbox"
v-model="state.indicatorValueForm.isItalic"
- @change="changeTitleStyle('isItalic')"
+ @change="changeLabelTitleStyleStyle('isItalic')"
>
@@ -244,7 +251,7 @@ defineExpose({ getFormData })
:effect="themes"
class="icon-radio-group"
v-model="state.indicatorValueForm.hPosition"
- @change="changeTitleStyle('hPosition')"
+ @change="changeLabelTitleStyleStyle('hPosition')"
>
@@ -309,7 +316,7 @@ defineExpose({ getFormData })
:effect="themes"
class="icon-radio-group"
v-model="state.indicatorValueForm.vPosition"
- @change="changeTitleStyle('vPosition')"
+ @change="changeLabelTitleStyleStyle('vPosition')"
>
@@ -373,7 +380,7 @@ defineExpose({ getFormData })
size="small"
:effect="themes"
v-model="state.indicatorValueForm.fontShadow"
- @change="changeTitleStyle('fontShadow')"
+ @change="changeLabelTitleStyleStyle('fontShadow')"
>
{{ t('chart.font_shadow') }}
@@ -386,7 +393,7 @@ defineExpose({ getFormData })
size="small"
:effect="themes"
v-model="state.indicatorValueForm.suffixEnable"
- @change="changeTitleStyle('suffixEnable')"
+ @change="changeLabelTitleStyleStyle('suffixEnable')"
>
{{ t('chart.indicator_suffix') }}
@@ -399,7 +406,7 @@ defineExpose({ getFormData })
v-model="state.indicatorValueForm.suffix"
:placeholder="t('chart.indicator_suffix_placeholder')"
maxlength="10"
- @change="changeTitleStyle('suffix')"
+ @change="changeLabelTitleStyleStyle('suffix')"
/>
@@ -409,7 +416,7 @@ defineExpose({ getFormData })
:effect="themes"
v-model="state.indicatorValueForm.suffixFontFamily"
:placeholder="t('chart.font_family')"
- @change="changeTitleStyle('suffixFontFamily')"
+ @change="changeLabelTitleStyleStyle('suffixFontFamily')"
>
@@ -442,7 +449,7 @@ defineExpose({ getFormData })
v-model="state.indicatorValueForm.suffixFontSize"
:placeholder="t('chart.text_fontsize')"
size="small"
- @change="changeTitleStyle('suffixFontSize')"
+ @change="changeLabelTitleStyleStyle('suffixFontSize')"
>
@@ -485,7 +492,7 @@ defineExpose({ getFormData })
:effect="themes"
class="icon-checkbox"
v-model="state.indicatorValueForm.suffixIsBolder"
- @change="changeTitleStyle('suffixIsBolder')"
+ @change="changeLabelTitleStyleStyle('suffixIsBolder')"
>
@@ -512,7 +519,7 @@ defineExpose({ getFormData })
:effect="themes"
class="icon-checkbox"
v-model="state.indicatorValueForm.suffixIsItalic"
- @change="changeTitleStyle('suffixIsItalic')"
+ @change="changeLabelTitleStyleStyle('suffixIsItalic')"
>
@@ -540,7 +547,7 @@ defineExpose({ getFormData })
size="small"
:effect="themes"
v-model="state.indicatorValueForm.suffixFontShadow"
- @change="changeTitleStyle('suffixFontShadow')"
+ @change="changeLabelTitleStyleStyle('suffixFontShadow')"
>
{{ t('chart.font_shadow') }}