forked from github/dataease
refactor(视图): 快速计算占比切换至其他类型时重置数值格式
This commit is contained in:
parent
a856e18215
commit
4b93aec122
@ -241,7 +241,7 @@
|
||||
|
||||
<script>
|
||||
import { compareItem } from '@/views/chart/chart/compare'
|
||||
import { getItemType, getOriginFieldName } from '@/views/chart/components/dragItem/utils'
|
||||
import { getItemType, getOriginFieldName, resetValueFormatter } from '@/views/chart/components/dragItem/utils'
|
||||
import FieldErrorTips from '@/views/chart/components/dragItem/components/FieldErrorTips'
|
||||
import bus from '@/utils/bus'
|
||||
import { formatterItem } from '@/views/chart/chart/formatter'
|
||||
@ -383,10 +383,14 @@ export default {
|
||||
quickCalc(param) {
|
||||
switch (param.type) {
|
||||
case 'none':
|
||||
// 选择占比外,设置自动
|
||||
resetValueFormatter(this.item)
|
||||
this.item.compareCalc.type = 'none'
|
||||
this.$emit('onQuotaItemChange', this.item)
|
||||
break
|
||||
case 'setting':
|
||||
// 选择占比外,设置自动
|
||||
resetValueFormatter(this.item)
|
||||
this.editCompare()
|
||||
break
|
||||
case 'percent':
|
||||
|
@ -241,7 +241,7 @@
|
||||
|
||||
<script>
|
||||
import { compareItem } from '@/views/chart/chart/compare'
|
||||
import { getItemType, getOriginFieldName } from '@/views/chart/components/dragItem/utils'
|
||||
import { getItemType, getOriginFieldName, resetValueFormatter } from '@/views/chart/components/dragItem/utils'
|
||||
import FieldErrorTips from '@/views/chart/components/dragItem/components/FieldErrorTips'
|
||||
import bus from '@/utils/bus'
|
||||
import { formatterItem } from '@/views/chart/chart/formatter'
|
||||
@ -380,10 +380,14 @@ export default {
|
||||
quickCalc(param) {
|
||||
switch (param.type) {
|
||||
case 'none':
|
||||
// 选择占比外,设置自动
|
||||
resetValueFormatter(this.item)
|
||||
this.item.compareCalc.type = 'none'
|
||||
this.$emit('onQuotaItemChange', this.item)
|
||||
break
|
||||
case 'setting':
|
||||
// 选择占比外,设置自动
|
||||
resetValueFormatter(this.item)
|
||||
this.editCompare()
|
||||
break
|
||||
case 'percent':
|
||||
|
Loading…
Reference in New Issue
Block a user