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