forked from github/dataease
Merge pull request #12557 from dataease/pr@dev-v2@chart-show-style
style(图表): 当切换图表类型时,如果图表缺字段展示不出来而显示空白时,那么显示当前图表类型的图标
This commit is contained in:
commit
ebafeb0598
@ -88,6 +88,10 @@ declare type AxisSpec = {
|
|||||||
* 轴提示
|
* 轴提示
|
||||||
*/
|
*/
|
||||||
tooltip?: string
|
tooltip?: string
|
||||||
|
/**
|
||||||
|
* 允许为空
|
||||||
|
*/
|
||||||
|
allowEmpty?: boolean
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 图表编辑表单
|
* 图表编辑表单
|
||||||
|
@ -250,7 +250,7 @@ const init = () => {
|
|||||||
const showProperty = prop => {
|
const showProperty = prop => {
|
||||||
const instance = chartViewManager.getChartView(props.chart.render, props.chart.type)
|
const instance = chartViewManager.getChartView(props.chart.render, props.chart.type)
|
||||||
if (instance) {
|
if (instance) {
|
||||||
return instance.propertyInner['tooltip-selector'].includes(prop)
|
return instance.propertyInner['tooltip-selector']?.includes(prop)
|
||||||
}
|
}
|
||||||
return props.propertyInner?.includes(prop)
|
return props.propertyInner?.includes(prop)
|
||||||
}
|
}
|
||||||
|
@ -836,6 +836,7 @@ const calcData = (view, resetDrill = false, updateQuery = '') => {
|
|||||||
|
|
||||||
const updateChartData = view => {
|
const updateChartData = view => {
|
||||||
curComponent.value['state'] = 'ready'
|
curComponent.value['state'] = 'ready'
|
||||||
|
useEmitt().emitter.emit('checkFieldIsAllowEmpty', allFields.value)
|
||||||
calcData(view, true, 'updateQuery')
|
calcData(view, true, 'updateQuery')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,10 @@ const DEFAULT_DATA = []
|
|||||||
export class HorizontalBar extends G2PlotChartView<BarOptions, Bar> {
|
export class HorizontalBar extends G2PlotChartView<BarOptions, Bar> {
|
||||||
axisConfig = {
|
axisConfig = {
|
||||||
...this['axisConfig'],
|
...this['axisConfig'],
|
||||||
|
xAxis: {
|
||||||
|
name: `${t('chart.drag_block_type_axis')} / ${t('chart.dimension')}`,
|
||||||
|
type: 'd'
|
||||||
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: `${t('chart.drag_block_value_axis')} / ${t('chart.quota')}`,
|
name: `${t('chart.drag_block_value_axis')} / ${t('chart.quota')}`,
|
||||||
type: 'q'
|
type: 'q'
|
||||||
@ -301,6 +305,14 @@ export class HorizontalBar extends G2PlotChartView<BarOptions, Bar> {
|
|||||||
* 堆叠条形图
|
* 堆叠条形图
|
||||||
*/
|
*/
|
||||||
export class HorizontalStackBar extends HorizontalBar {
|
export class HorizontalStackBar extends HorizontalBar {
|
||||||
|
axisConfig = {
|
||||||
|
...this['axisConfig'],
|
||||||
|
extStack: {
|
||||||
|
name: `${t('chart.stack_item')} / ${t('chart.dimension')}`,
|
||||||
|
type: 'd',
|
||||||
|
limit: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
propertyInner = {
|
propertyInner = {
|
||||||
...this['propertyInner'],
|
...this['propertyInner'],
|
||||||
'label-selector': ['color', 'fontSize', 'hPosition', 'labelFormatter'],
|
'label-selector': ['color', 'fontSize', 'hPosition', 'labelFormatter'],
|
||||||
|
@ -15,7 +15,6 @@ const { t } = useI18n()
|
|||||||
|
|
||||||
export class ProgressBar extends G2PlotChartView<BarOptions, G2Progress> {
|
export class ProgressBar extends G2PlotChartView<BarOptions, G2Progress> {
|
||||||
axisConfig = {
|
axisConfig = {
|
||||||
...this['axisConfig'],
|
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: `${t('chart.form_type')} / ${t('chart.dimension')}`,
|
name: `${t('chart.form_type')} / ${t('chart.dimension')}`,
|
||||||
type: 'd',
|
type: 'd',
|
||||||
|
@ -23,7 +23,6 @@ const DEFAULT_DATA = []
|
|||||||
*/
|
*/
|
||||||
export class RangeBar extends G2PlotChartView<BarOptions, Bar> {
|
export class RangeBar extends G2PlotChartView<BarOptions, Bar> {
|
||||||
axisConfig = {
|
axisConfig = {
|
||||||
...this['axisConfig'],
|
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: `${t('chart.drag_block_value_start')} / ${t('chart.time_dimension_or_quota')}`,
|
name: `${t('chart.drag_block_value_start')} / ${t('chart.time_dimension_or_quota')}`,
|
||||||
limit: 1,
|
limit: 1,
|
||||||
|
@ -4,6 +4,8 @@ import { flow, hexColorToRGBA, parseJson } from '../../../util'
|
|||||||
import { valueFormatter } from '../../../formatter'
|
import { valueFormatter } from '../../../formatter'
|
||||||
import { getPadding, getTooltipSeriesTotalMap, setGradientColor } from '../../common/common_antv'
|
import { getPadding, getTooltipSeriesTotalMap, setGradientColor } from '../../common/common_antv'
|
||||||
import { isEmpty } from 'lodash-es'
|
import { isEmpty } from 'lodash-es'
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 瀑布图
|
* 瀑布图
|
||||||
@ -62,6 +64,17 @@ export class Waterfall extends G2PlotChartView<WaterfallOptions, G2Waterfall> {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
axis: AxisType[] = ['xAxis', 'yAxis', 'filter', 'drill', 'extLabel', 'extTooltip']
|
axis: AxisType[] = ['xAxis', 'yAxis', 'filter', 'drill', 'extLabel', 'extTooltip']
|
||||||
|
axisConfig = {
|
||||||
|
xAxis: {
|
||||||
|
name: `${t('chart.drag_block_type_axis')} / ${t('chart.dimension')}`,
|
||||||
|
type: 'd'
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
name: `${t('chart.drag_block_value_axis')} / ${t('chart.quota')}`,
|
||||||
|
type: 'q',
|
||||||
|
limit: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
async drawChart(drawOptions: G2PlotDrawOptions<G2Waterfall>): Promise<G2Waterfall> {
|
async drawChart(drawOptions: G2PlotDrawOptions<G2Waterfall>): Promise<G2Waterfall> {
|
||||||
const { chart, container, action } = drawOptions
|
const { chart, container, action } = drawOptions
|
||||||
if (!chart.data?.data) {
|
if (!chart.data?.data) {
|
||||||
|
@ -44,6 +44,10 @@ export class Area extends G2PlotChartView<AreaOptions, G2Area> {
|
|||||||
axis: AxisType[] = [...LINE_AXIS_TYPE]
|
axis: AxisType[] = [...LINE_AXIS_TYPE]
|
||||||
axisConfig = {
|
axisConfig = {
|
||||||
...this['axisConfig'],
|
...this['axisConfig'],
|
||||||
|
xAxis: {
|
||||||
|
name: `${t('chart.drag_block_type_axis')} / ${t('chart.dimension')}`,
|
||||||
|
type: 'd'
|
||||||
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: `${t('chart.drag_block_value_axis')} / ${t('chart.quota')}`,
|
name: `${t('chart.drag_block_value_axis')} / ${t('chart.quota')}`,
|
||||||
type: 'q'
|
type: 'q'
|
||||||
@ -289,6 +293,14 @@ export class StackArea extends Area {
|
|||||||
'label-selector': ['fontSize', 'color', 'labelFormatter'],
|
'label-selector': ['fontSize', 'color', 'labelFormatter'],
|
||||||
'tooltip-selector': ['fontSize', 'color', 'tooltipFormatter', 'show']
|
'tooltip-selector': ['fontSize', 'color', 'tooltipFormatter', 'show']
|
||||||
}
|
}
|
||||||
|
axisConfig = {
|
||||||
|
...this['axisConfig'],
|
||||||
|
extStack: {
|
||||||
|
name: `${t('chart.stack_item')} / ${t('chart.dimension')}`,
|
||||||
|
type: 'd',
|
||||||
|
limit: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
protected configLabel(chart: Chart, options: AreaOptions): AreaOptions {
|
protected configLabel(chart: Chart, options: AreaOptions): AreaOptions {
|
||||||
const customAttr = parseJson(chart.customAttr)
|
const customAttr = parseJson(chart.customAttr)
|
||||||
const labelAttr = customAttr.label
|
const labelAttr = customAttr.label
|
||||||
|
@ -42,6 +42,15 @@ export class Line extends G2PlotChartView<LineOptions, G2Line> {
|
|||||||
axis: AxisType[] = [...LINE_AXIS_TYPE, 'xAxisExt']
|
axis: AxisType[] = [...LINE_AXIS_TYPE, 'xAxisExt']
|
||||||
axisConfig = {
|
axisConfig = {
|
||||||
...this['axisConfig'],
|
...this['axisConfig'],
|
||||||
|
xAxis: {
|
||||||
|
name: `${t('chart.drag_block_type_axis')} / ${t('chart.dimension')}`,
|
||||||
|
type: 'd'
|
||||||
|
},
|
||||||
|
xAxisExt: {
|
||||||
|
name: `${t('chart.chart_group')} / ${t('chart.dimension')}`,
|
||||||
|
type: 'd',
|
||||||
|
limit: 1
|
||||||
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: `${t('chart.drag_block_value_axis')} / ${t('chart.quota')}`,
|
name: `${t('chart.drag_block_value_axis')} / ${t('chart.quota')}`,
|
||||||
type: 'q'
|
type: 'q'
|
||||||
|
@ -46,7 +46,6 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
|
|||||||
}
|
}
|
||||||
axis: AxisType[] = ['xAxis', 'yAxis', 'filter', 'extLabel', 'extTooltip']
|
axis: AxisType[] = ['xAxis', 'yAxis', 'filter', 'extLabel', 'extTooltip']
|
||||||
axisConfig = {
|
axisConfig = {
|
||||||
...this['axisConfig'],
|
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: `日期 / ${t('chart.dimension')}`,
|
name: `日期 / ${t('chart.dimension')}`,
|
||||||
limit: 1,
|
limit: 1,
|
||||||
|
@ -47,18 +47,21 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
flowMapStartName: {
|
flowMapStartName: {
|
||||||
name: `起点名称 / ${t('chart.dimension')}`,
|
name: `起点名称 / ${t('chart.dimension')}`,
|
||||||
type: 'd',
|
type: 'd',
|
||||||
limit: 1
|
limit: 1,
|
||||||
|
allowEmpty: true
|
||||||
},
|
},
|
||||||
flowMapEndName: {
|
flowMapEndName: {
|
||||||
name: `终点名称 / ${t('chart.dimension')}`,
|
name: `终点名称 / ${t('chart.dimension')}`,
|
||||||
type: 'd',
|
type: 'd',
|
||||||
limit: 1
|
limit: 1,
|
||||||
|
allowEmpty: true
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: `线条粗细 / ${t('chart.quota')}`,
|
name: `线条粗细 / ${t('chart.quota')}`,
|
||||||
type: 'q',
|
type: 'q',
|
||||||
limit: 1,
|
limit: 1,
|
||||||
tooltip: '该指标生效时,样式中线条配置的线条宽度属性将失效'
|
tooltip: '该指标生效时,样式中线条配置的线条宽度属性将失效',
|
||||||
|
allowEmpty: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -52,13 +52,15 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
xAxisExt: {
|
xAxisExt: {
|
||||||
name: `颜色 / ${t('chart.dimension')}`,
|
name: `颜色 / ${t('chart.dimension')}`,
|
||||||
type: 'd',
|
type: 'd',
|
||||||
limit: 1
|
limit: 1,
|
||||||
|
allowEmpty: true
|
||||||
},
|
},
|
||||||
extBubble: {
|
extBubble: {
|
||||||
name: `${t('chart.bubble_size')} / ${t('chart.quota')}`,
|
name: `${t('chart.bubble_size')} / ${t('chart.quota')}`,
|
||||||
type: 'q',
|
type: 'q',
|
||||||
limit: 1,
|
limit: 1,
|
||||||
tooltip: '该指标生效时,样式基础样式中的大小属性将失效'
|
tooltip: '该指标生效时,样式基础样式中的大小属性将失效',
|
||||||
|
allowEmpty: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -88,11 +88,11 @@ export class Quadrant extends G2PlotChartView<ScatterOptions, G2Scatter> {
|
|||||||
'extTooltip'
|
'extTooltip'
|
||||||
]
|
]
|
||||||
axisConfig: AxisConfig = {
|
axisConfig: AxisConfig = {
|
||||||
...this['axisConfig'],
|
|
||||||
extBubble: {
|
extBubble: {
|
||||||
name: `${t('chart.bubble_size')} / ${t('chart.quota')}`,
|
name: `${t('chart.bubble_size')} / ${t('chart.quota')}`,
|
||||||
type: 'q',
|
type: 'q',
|
||||||
limit: 1
|
limit: 1,
|
||||||
|
allowEmpty: true
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: `${t('chart.form_type')} / ${t('chart.dimension')}`,
|
name: `${t('chart.form_type')} / ${t('chart.dimension')}`,
|
||||||
@ -413,7 +413,7 @@ export class Quadrant extends G2PlotChartView<ScatterOptions, G2Scatter> {
|
|||||||
if (!(xAxis?.length && yAxis?.length && yAxisExt?.length)) {
|
if (!(xAxis?.length && yAxis?.length && yAxisExt?.length)) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
const tmp = data[0].data
|
const tmp = data?.[0]?.data
|
||||||
return setUpSingleDimensionSeriesColor(chart, tmp)
|
return setUpSingleDimensionSeriesColor(chart, tmp)
|
||||||
}
|
}
|
||||||
protected setupOptions(chart: Chart, options: ScatterOptions) {
|
protected setupOptions(chart: Chart, options: ScatterOptions) {
|
||||||
|
@ -24,7 +24,6 @@ const DEFAULT_DATA = []
|
|||||||
*/
|
*/
|
||||||
export class RangeBar extends G2PlotChartView<SankeyOptions, Sankey> {
|
export class RangeBar extends G2PlotChartView<SankeyOptions, Sankey> {
|
||||||
axisConfig = {
|
axisConfig = {
|
||||||
...this['axisConfig'],
|
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: `${t('chart.drag_block_type_axis_start')} / ${t('chart.dimension')}`,
|
name: `${t('chart.drag_block_type_axis_start')} / ${t('chart.dimension')}`,
|
||||||
limit: 1,
|
limit: 1,
|
||||||
|
@ -75,7 +75,10 @@ export class Scatter extends G2PlotChartView<ScatterOptions, G2Scatter> {
|
|||||||
}
|
}
|
||||||
axis: AxisType[] = ['xAxis', 'yAxis', 'extBubble', 'filter', 'drill', 'extLabel', 'extTooltip']
|
axis: AxisType[] = ['xAxis', 'yAxis', 'extBubble', 'filter', 'drill', 'extLabel', 'extTooltip']
|
||||||
axisConfig: AxisConfig = {
|
axisConfig: AxisConfig = {
|
||||||
...this['axisConfig'],
|
xAxis: {
|
||||||
|
name: `${t('chart.drag_block_type_axis')} / ${t('chart.dimension')}`,
|
||||||
|
type: 'd'
|
||||||
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
...this['axisConfig'].yAxis,
|
...this['axisConfig'].yAxis,
|
||||||
limit: undefined
|
limit: undefined
|
||||||
@ -83,7 +86,8 @@ export class Scatter extends G2PlotChartView<ScatterOptions, G2Scatter> {
|
|||||||
extBubble: {
|
extBubble: {
|
||||||
name: `${t('chart.bubble_size')} / ${t('chart.quota')}`,
|
name: `${t('chart.bubble_size')} / ${t('chart.quota')}`,
|
||||||
type: 'q',
|
type: 'q',
|
||||||
limit: 1
|
limit: 1,
|
||||||
|
allowEmpty: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async drawChart(drawOptions: G2PlotDrawOptions<G2Scatter>): Promise<G2Scatter> {
|
async drawChart(drawOptions: G2PlotDrawOptions<G2Scatter>): Promise<G2Scatter> {
|
||||||
|
@ -73,7 +73,7 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
|||||||
const containerDom = document.getElementById(container)
|
const containerDom = document.getElementById(container)
|
||||||
|
|
||||||
// fields
|
// fields
|
||||||
let fields = chart.data.fields
|
let fields = chart.data?.fields ?? []
|
||||||
const columns = []
|
const columns = []
|
||||||
const meta = []
|
const meta = []
|
||||||
const axisMap = chart.xAxis.reduce((pre, cur) => {
|
const axisMap = chart.xAxis.reduce((pre, cur) => {
|
||||||
|
@ -107,7 +107,8 @@ export class TablePivot extends S2ChartView<PivotSheet> {
|
|||||||
},
|
},
|
||||||
xAxisExt: {
|
xAxisExt: {
|
||||||
name: `${t('chart.drag_block_table_data_column')} / ${t('chart.dimension')}`,
|
name: `${t('chart.drag_block_table_data_column')} / ${t('chart.dimension')}`,
|
||||||
type: 'd'
|
type: 'd',
|
||||||
|
allowEmpty: true
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: `${t('chart.drag_block_table_data_column')} / ${t('chart.quota')}`,
|
name: `${t('chart.drag_block_table_data_column')} / ${t('chart.quota')}`,
|
||||||
|
@ -80,22 +80,26 @@ export abstract class AntVAbstractChartView extends AbstractChartView {
|
|||||||
axisConfig: AxisConfig = {
|
axisConfig: AxisConfig = {
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: `${t('chart.drag_block_type_axis')} / ${t('chart.dimension')}`,
|
name: `${t('chart.drag_block_type_axis')} / ${t('chart.dimension')}`,
|
||||||
type: 'd'
|
type: 'd',
|
||||||
|
allowEmpty: true
|
||||||
},
|
},
|
||||||
xAxisExt: {
|
xAxisExt: {
|
||||||
name: `${t('chart.chart_group')} / ${t('chart.dimension')}`,
|
name: `${t('chart.chart_group')} / ${t('chart.dimension')}`,
|
||||||
type: 'd',
|
type: 'd',
|
||||||
limit: 1
|
limit: 1,
|
||||||
|
allowEmpty: true
|
||||||
},
|
},
|
||||||
extStack: {
|
extStack: {
|
||||||
name: `${t('chart.stack_item')} / ${t('chart.dimension')}`,
|
name: `${t('chart.stack_item')} / ${t('chart.dimension')}`,
|
||||||
type: 'd',
|
type: 'd',
|
||||||
limit: 1
|
limit: 1,
|
||||||
|
allowEmpty: true
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: `${t('chart.drag_block_value_axis')} / ${t('chart.quota')}`,
|
name: `${t('chart.drag_block_value_axis')} / ${t('chart.quota')}`,
|
||||||
type: 'q',
|
type: 'q',
|
||||||
limit: 1
|
limit: 1,
|
||||||
|
allowEmpty: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
selectorSpec: EditorSelectorSpec = {
|
selectorSpec: EditorSelectorSpec = {
|
||||||
|
@ -573,13 +573,74 @@ onBeforeMount(() => {
|
|||||||
const listenerEnable = computed(() => {
|
const listenerEnable = computed(() => {
|
||||||
return !showPosition.value.includes('viewDialog')
|
return !showPosition.value.includes('viewDialog')
|
||||||
})
|
})
|
||||||
|
const showEmpty = ref(false)
|
||||||
|
const checkFieldIsAllowEmpty = (allField?) => {
|
||||||
|
showEmpty.value = false
|
||||||
|
if (view.value?.render && view.value?.type) {
|
||||||
|
const chartView = chartViewManager.getChartView(view.value.render, view.value.type)
|
||||||
|
const axisConfigMap = new Map(Object.entries(chartView.axisConfig))
|
||||||
|
// 验证拖入的字段是否包含在当前数据集字段中,如果一个都不在数据集字段中,则显示空图表
|
||||||
|
let includeDatasetField = false
|
||||||
|
if (allField && allField.length > 0) {
|
||||||
|
axisConfigMap.forEach((value, key) => {
|
||||||
|
if (view.value?.[key]?.length > 0) {
|
||||||
|
view.value[key].forEach(item => {
|
||||||
|
if (!allField.find(field => field.id === item.id)) {
|
||||||
|
includeDatasetField = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (includeDatasetField) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (includeDatasetField) {
|
||||||
|
showEmpty.value = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
axisConfigMap.forEach((value, key) => {
|
||||||
|
// 不允许为空,并且没限制长度
|
||||||
|
if (!value['allowEmpty'] && !value['limit'] && view.value?.[key]?.length === 0) {
|
||||||
|
showEmpty.value = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// 不允许为空, 限制长度
|
||||||
|
if (
|
||||||
|
!value['allowEmpty'] &&
|
||||||
|
value['limit'] &&
|
||||||
|
view.value?.[key]?.length < parseInt(value['limit'])
|
||||||
|
) {
|
||||||
|
showEmpty.value = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (view.value?.type === 'table-info' && view.value?.[key]?.length === 0) {
|
||||||
|
showEmpty.value = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const changeChartType = () => {
|
||||||
|
checkFieldIsAllowEmpty()
|
||||||
|
}
|
||||||
|
const changeDataset = () => {
|
||||||
|
checkFieldIsAllowEmpty()
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!view.value.isPlugin) {
|
if (!view.value.isPlugin) {
|
||||||
queryData(true && !showPosition.value.includes('viewDialog'))
|
queryData(!showPosition.value.includes('viewDialog'))
|
||||||
}
|
}
|
||||||
if (!listenerEnable.value) {
|
if (!listenerEnable.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
useEmitt({
|
||||||
|
name: 'checkFieldIsAllowEmpty',
|
||||||
|
callback: allField => checkFieldIsAllowEmpty(allField)
|
||||||
|
})
|
||||||
|
useEmitt({ name: 'chart-type-change', callback: changeChartType })
|
||||||
|
useEmitt({ name: 'dataset-change', callback: changeDataset })
|
||||||
useEmitt({
|
useEmitt({
|
||||||
name: 'clearPanelLinkage',
|
name: 'clearPanelLinkage',
|
||||||
callback: function (param) {
|
callback: function (param) {
|
||||||
@ -913,7 +974,7 @@ const loadPluginCategory = data => {
|
|||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
<!--这里去渲染不同图库的图表-->
|
<!--这里去渲染不同图库的图表-->
|
||||||
<div v-if="chartAreaShow" style="flex: 1; overflow: hidden">
|
<div v-if="chartAreaShow && !showEmpty" style="flex: 1; overflow: hidden">
|
||||||
<plugin-component
|
<plugin-component
|
||||||
v-if="view.plugin?.isPlugin"
|
v-if="view.plugin?.isPlugin"
|
||||||
:jsname="view.plugin.staticMap['index']"
|
:jsname="view.plugin.staticMap['index']"
|
||||||
@ -991,7 +1052,7 @@ const loadPluginCategory = data => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<chart-empty-info
|
<chart-empty-info
|
||||||
v-if="!chartAreaShow"
|
v-if="!chartAreaShow || showEmpty"
|
||||||
:themes="canvasStyleData.dashboard.themeColor"
|
:themes="canvasStyleData.dashboard.themeColor"
|
||||||
:view-icon="view.type"
|
:view-icon="view.type"
|
||||||
></chart-empty-info>
|
></chart-empty-info>
|
||||||
|
Loading…
Reference in New Issue
Block a user