forked from github/dataease
fix(数据大屏): 图标颜色不对
This commit is contained in:
parent
8866de1158
commit
1d4a21161a
@ -35,6 +35,14 @@ const filterTypeCom = computed(() => {
|
||||
: Select
|
||||
})
|
||||
|
||||
const emits = defineEmits(['handleTimeTypeChange'])
|
||||
|
||||
const handleTimeTypeChange = val => {
|
||||
if (val === 'dynamic') {
|
||||
emits('handleTimeTypeChange')
|
||||
}
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
curComponent: {
|
||||
type: Object,
|
||||
@ -436,7 +444,7 @@ defineExpose({
|
||||
v-if="curComponent.defaultValueCheck && ['1', '7'].includes(curComponent.displayType)"
|
||||
>
|
||||
<div class="setting">
|
||||
<el-radio-group v-model="curComponent.timeType">
|
||||
<el-radio-group @change="handleTimeTypeChange" v-model="curComponent.timeType">
|
||||
<el-radio label="fixed">固定时间</el-radio>
|
||||
<el-radio label="dynamic">动态时间</el-radio>
|
||||
</el-radio-group>
|
||||
|
@ -1332,6 +1332,11 @@ const timeGranularityChange = (val: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
const handleTimeTypeChange = () => {
|
||||
timeGranularityChange(curComponent.value.timeGranularity)
|
||||
timeGranularityMultipleChange(curComponent.value.timeGranularityMultiple)
|
||||
}
|
||||
|
||||
const timeGranularityMultipleChange = (val: string) => {
|
||||
handleDialogClick()
|
||||
curComponent.value.relativeToCurrentType = ['daterange', 'datetimerange'].includes(val)
|
||||
@ -2121,6 +2126,7 @@ defineExpose({
|
||||
</div>
|
||||
<condition-default-configuration
|
||||
ref="defaultConfigurationRef"
|
||||
@handleTimeTypeChange="handleTimeTypeChange"
|
||||
:cur-component="curComponent"
|
||||
></condition-default-configuration>
|
||||
</div>
|
||||
|
@ -100,16 +100,6 @@ export const selectKey = ['textAlign', 'borderStyle', 'verticalAlign']
|
||||
export const horizontalPosition = ['headHorizontalPosition']
|
||||
|
||||
export const fieldType = ['text', 'time', 'value', 'value', 'value', 'location', 'binary', 'url']
|
||||
export const fieldTypeCalculated = [
|
||||
'icon_text_calculated_outlined',
|
||||
'icon_calendar_calculated_outlined',
|
||||
'icon_number_calculated_outlined',
|
||||
'icon_number_calculated_outlined',
|
||||
'icon_number_calculated_outlined',
|
||||
'icon_local_calculated_outlined',
|
||||
'binary',
|
||||
'icon_link_calculated_outlined'
|
||||
]
|
||||
export const fieldTypeText = [
|
||||
'文本',
|
||||
'时间',
|
||||
|
@ -18,9 +18,7 @@ import {
|
||||
nextTick,
|
||||
onBeforeMount,
|
||||
provide,
|
||||
h,
|
||||
unref,
|
||||
getCurrentInstance,
|
||||
onMounted
|
||||
} from 'vue'
|
||||
import Icon from '@/components/icon-custom/src/Icon.vue'
|
||||
@ -32,7 +30,7 @@ import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import { ElMessage, ElTreeSelect } from 'element-plus-secondary'
|
||||
import draggable from 'vuedraggable'
|
||||
import DimensionItem from './drag-item/DimensionItem.vue'
|
||||
import { fieldType, fieldTypeCalculated } from '@/utils/attr'
|
||||
import { fieldType } from '@/utils/attr'
|
||||
import QuotaItem from '@/views/chart/components/editor/drag-item/QuotaItem.vue'
|
||||
import DragPlaceholder from '@/views/chart/components/editor/drag-item/DragPlaceholder.vue'
|
||||
import FilterTree from './filter/FilterTree.vue'
|
||||
@ -1454,7 +1452,7 @@ const confirmEditCalc = () => {
|
||||
const getIconName = (deType, extField, dimension = false) => {
|
||||
if (extField === 2) {
|
||||
const iconFieldCalculated = dimension ? iconFieldCalculatedMap : iconFieldCalculatedQMap
|
||||
return iconFieldCalculated[fieldTypeCalculated[deType]]
|
||||
return iconFieldCalculated[deType]
|
||||
}
|
||||
return iconFieldMap[fieldType[deType]]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user