forked from github/dataease
Merge branch 'dev' into pr@dev_memory_component
This commit is contained in:
commit
86bc57b8dd
@ -5,7 +5,7 @@
|
||||
trigger="click"
|
||||
@mouseup="handleMouseUp"
|
||||
>
|
||||
<slot name="icon" />
|
||||
<slot name="icon"/>
|
||||
<el-dropdown-menu v-if="curComponent">
|
||||
<el-dropdown-item
|
||||
v-if="editFilter.includes(curComponent.type)"
|
||||
@ -33,7 +33,7 @@
|
||||
<el-dropdown-item v-if="!curComponent.auxiliaryMatrix">
|
||||
<el-dropdown placement="right-start">
|
||||
<span class="el-icon-copy-document">
|
||||
{{ $t('panel.level') }} <i class="el-icon-arrow-right el-icon--right" />
|
||||
{{ $t('panel.level') }} <i class="el-icon-arrow-right el-icon--right"/>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item
|
||||
@ -87,14 +87,14 @@
|
||||
v-if="curComponent.type != 'custom-button'"
|
||||
@click.native="hyperlinksSet"
|
||||
>
|
||||
<i class="icon iconfont icon-font icon-chaolianjie1" />
|
||||
<i class="icon iconfont icon-font icon-chaolianjie1"/>
|
||||
{{ $t('panel.hyperlinks') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="curComponent.type !== 'user-view' && !curComponent.auxiliaryMatrix"
|
||||
v-if="curComponent.type !== 'view' && !curComponent.auxiliaryMatrix"
|
||||
@click.native="positionAdjust"
|
||||
>
|
||||
<i class="el-icon-map-location" />
|
||||
<i class="el-icon-map-location"/>
|
||||
{{ $t('panel.position_adjust') }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
|
@ -88,6 +88,8 @@ export default {
|
||||
component.style.width = width
|
||||
component.style.height = height
|
||||
}
|
||||
component['canvasId'] = 'canvas-main'
|
||||
component['canvasPid'] = '0'
|
||||
state.copyData = {
|
||||
data: component,
|
||||
index: index
|
||||
|
@ -202,7 +202,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<text-attr
|
||||
v-if="showAttr && curComponent.canvasId === activeCanvasId"
|
||||
v-if="showAttr && curComponent.canvasId === activeCanvasId" && isEdit
|
||||
:canvas-id="curComponent.canvasId"
|
||||
:scroll-left="scrollLeft"
|
||||
:scroll-top="scrollTop"
|
||||
|
@ -1883,6 +1883,7 @@ export default {
|
||||
back_parent: 'Back to previous'
|
||||
},
|
||||
panel: {
|
||||
position_adjust_component: 'Position adjust',
|
||||
active_font_size: 'Active font size',
|
||||
carousel: 'Carousel',
|
||||
switch_time: 'Switch time',
|
||||
|
@ -1883,6 +1883,7 @@ export default {
|
||||
back_parent: '返回上一級'
|
||||
},
|
||||
panel: {
|
||||
position_adjust_component: '位置調整',
|
||||
active_font_size: '激活字體大小',
|
||||
carousel: '輪播',
|
||||
switch_time: '切換時間',
|
||||
|
@ -1883,6 +1883,7 @@ export default {
|
||||
back_parent: '返回上一级'
|
||||
},
|
||||
panel: {
|
||||
position_adjust_component: '位置调整',
|
||||
active_font_size: '激活字体大小',
|
||||
carousel: '轮播',
|
||||
switch_time: '切换时间',
|
||||
|
@ -1681,6 +1681,7 @@ export const TYPE_CONFIGS = [
|
||||
propertyInner: {
|
||||
'color-selector': [
|
||||
'value',
|
||||
'custom',
|
||||
'alpha'
|
||||
],
|
||||
'tooltip-selector-ant-v': [
|
||||
@ -3422,12 +3423,10 @@ export function handleEmptyDataStrategy(strategy, chart, data, options) {
|
||||
const multiDimension = yaxis?.length >= 2 || extAxis?.length > 0
|
||||
switch (strategy) {
|
||||
case 'breakLine': {
|
||||
options.connectNulls = false
|
||||
if (multiDimension) {
|
||||
// 多维度线条断开
|
||||
handleBreakLineMultiDimension(chart, data, options)
|
||||
} else {
|
||||
// 单维度线条断开
|
||||
options.connectNulls = false
|
||||
handleBreakLineMultiDimension(chart, data)
|
||||
}
|
||||
break
|
||||
}
|
||||
@ -3446,8 +3445,7 @@ export function handleEmptyDataStrategy(strategy, chart, data, options) {
|
||||
}
|
||||
}
|
||||
|
||||
function handleBreakLineMultiDimension(chart, data, options) {
|
||||
options.connectNulls = false
|
||||
function handleBreakLineMultiDimension(chart, data) {
|
||||
const dimensionInfoMap = new Map()
|
||||
const subDimensionSet = new Set()
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
@ -3464,15 +3462,18 @@ function handleBreakLineMultiDimension(chart, data, options) {
|
||||
let insertCount = 0
|
||||
dimensionInfoMap.forEach((dimensionInfo, field) => {
|
||||
if (dimensionInfo.set.size < subDimensionSet.size) {
|
||||
const toBeFillDimension = [...subDimensionSet].filter(item => !dimensionInfo.set.has(item))
|
||||
toBeFillDimension.forEach(dimension => {
|
||||
data.splice(dimensionInfo.index + insertCount, 0, {
|
||||
field,
|
||||
value: null,
|
||||
category: dimension
|
||||
})
|
||||
let subInsertIndex = 0
|
||||
subDimensionSet.forEach(dimension => {
|
||||
if (!dimensionInfo.set.has(dimension)) {
|
||||
data.splice(dimensionInfo.index + insertCount + subInsertIndex, 0, {
|
||||
field,
|
||||
value: null,
|
||||
category: dimension
|
||||
})
|
||||
}
|
||||
subInsertIndex++
|
||||
})
|
||||
insertCount += toBeFillDimension.size
|
||||
insertCount += subDimensionSet.size - dimensionInfo.set.size
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -192,7 +192,7 @@
|
||||
@command="chartFieldEdit"
|
||||
>
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-s-tools" />
|
||||
<i class="el-icon-s-tools"/>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item
|
||||
@ -267,7 +267,7 @@
|
||||
@command="chartFieldEdit"
|
||||
>
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-s-tools" />
|
||||
<i class="el-icon-s-tools"/>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item
|
||||
@ -362,7 +362,7 @@
|
||||
style="padding: 6px;"
|
||||
>
|
||||
{{ $t('chart.change_chart_type') }}
|
||||
<i class="el-icon-caret-bottom" />
|
||||
<i class="el-icon-caret-bottom"/>
|
||||
</el-button>
|
||||
</el-popover>
|
||||
</span>
|
||||
@ -490,8 +490,8 @@
|
||||
>
|
||||
<span class="data-area-label">
|
||||
<span v-if="view.type && view.type.includes('table')">{{
|
||||
$t('chart.drag_block_table_data_column')
|
||||
}}</span>
|
||||
$t('chart.drag_block_table_data_column')
|
||||
}}</span>
|
||||
<span
|
||||
v-else-if="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'chart-mix' || view.type === 'waterfall' || view.type === 'area')"
|
||||
>{{ $t('chart.drag_block_type_axis') }}</span>
|
||||
@ -499,18 +499,18 @@
|
||||
v-else-if="view.type && view.type.includes('pie')"
|
||||
>{{ $t('chart.drag_block_pie_label') }}</span>
|
||||
<span v-else-if="view.type && view.type.includes('funnel')">{{
|
||||
$t('chart.drag_block_funnel_split')
|
||||
}}</span>
|
||||
$t('chart.drag_block_funnel_split')
|
||||
}}</span>
|
||||
<span v-else-if="view.type && view.type.includes('radar')">{{
|
||||
$t('chart.drag_block_radar_label')
|
||||
}}</span>
|
||||
$t('chart.drag_block_radar_label')
|
||||
}}</span>
|
||||
<span v-else-if="view.type && view.type === 'map'">{{ $t('chart.area') }}</span>
|
||||
<span v-else-if="view.type && view.type.includes('treemap')">{{
|
||||
$t('chart.drag_block_treemap_label')
|
||||
}}</span>
|
||||
$t('chart.drag_block_treemap_label')
|
||||
}}</span>
|
||||
<span v-else-if="view.type && view.type === 'word-cloud'">{{
|
||||
$t('chart.drag_block_word_cloud_label')
|
||||
}}</span>
|
||||
$t('chart.drag_block_word_cloud_label')
|
||||
}}</span>
|
||||
<span v-else-if="view.type && view.type === 'label'">{{ $t('chart.drag_block_label') }}</span>
|
||||
<span v-show="view.type !== 'richTextView'"> / </span>
|
||||
<span v-if="view.type && view.type !== 'table-info'">{{ $t('chart.dimension') }}</span>
|
||||
@ -633,8 +633,8 @@
|
||||
>
|
||||
<span class="data-area-label">
|
||||
<span v-if="view.type && view.type.includes('table')">{{
|
||||
$t('chart.drag_block_table_data_column')
|
||||
}}</span>
|
||||
$t('chart.drag_block_table_data_column')
|
||||
}}</span>
|
||||
<span
|
||||
v-else-if="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'waterfall' || view.type === 'area')"
|
||||
>{{ $t('chart.drag_block_value_axis') }}</span>
|
||||
@ -642,30 +642,30 @@
|
||||
v-else-if="view.type && view.type.includes('pie')"
|
||||
>{{ $t('chart.drag_block_pie_angel') }}</span>
|
||||
<span v-else-if="view.type && view.type.includes('funnel')">{{
|
||||
$t('chart.drag_block_funnel_width')
|
||||
}}</span>
|
||||
$t('chart.drag_block_funnel_width')
|
||||
}}</span>
|
||||
<span v-else-if="view.type && view.type.includes('radar')">{{
|
||||
$t('chart.drag_block_radar_length')
|
||||
}}</span>
|
||||
$t('chart.drag_block_radar_length')
|
||||
}}</span>
|
||||
<span v-else-if="view.type && view.type.includes('gauge')">{{
|
||||
$t('chart.drag_block_gauge_angel')
|
||||
}}</span>
|
||||
$t('chart.drag_block_gauge_angel')
|
||||
}}</span>
|
||||
<span
|
||||
v-else-if="view.type && view.type.includes('text')"
|
||||
>{{ $t('chart.drag_block_label_value') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'map'">{{ $t('chart.chart_data') }}</span>
|
||||
<span v-else-if="view.type && view.type.includes('tree')">{{
|
||||
$t('chart.drag_block_treemap_size')
|
||||
}}</span>
|
||||
$t('chart.drag_block_treemap_size')
|
||||
}}</span>
|
||||
<span v-else-if="view.type && view.type === 'chart-mix'">{{
|
||||
$t('chart.drag_block_value_axis_main')
|
||||
}}</span>
|
||||
$t('chart.drag_block_value_axis_main')
|
||||
}}</span>
|
||||
<span
|
||||
v-else-if="view.type && view.type === 'liquid'"
|
||||
>{{ $t('chart.drag_block_progress') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'word-cloud'">{{
|
||||
$t('chart.drag_block_word_cloud_size')
|
||||
}}</span>
|
||||
$t('chart.drag_block_word_cloud_size')
|
||||
}}</span>
|
||||
<span v-show="view.type !== 'richTextView'"> / </span>
|
||||
<span>{{ $t('chart.quota') }}</span>
|
||||
<i
|
||||
@ -1116,7 +1116,20 @@
|
||||
class="padding-tab"
|
||||
style="width: 350px;"
|
||||
>
|
||||
<position-adjust />
|
||||
<div class="attr-style theme-border-class">
|
||||
<el-collapse
|
||||
v-model="positionActiveNames"
|
||||
class="style-collapse"
|
||||
>
|
||||
<el-collapse-item
|
||||
:title="$t('panel.position_adjust_component')"
|
||||
:name="'positionAdjust'"
|
||||
>
|
||||
<position-adjust/>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
@ -1268,7 +1281,7 @@
|
||||
width="800px"
|
||||
class="dialog-css"
|
||||
>
|
||||
<quota-filter-editor :item="quotaItem" />
|
||||
<quota-filter-editor :item="quotaItem"/>
|
||||
<div
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
@ -1295,7 +1308,7 @@
|
||||
width="800px"
|
||||
class="dialog-css"
|
||||
>
|
||||
<dimension-filter-editor :item="dimensionItem" />
|
||||
<dimension-filter-editor :item="dimensionItem"/>
|
||||
<div
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
@ -1713,6 +1726,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
positionActiveNames: 'positionAdjust',
|
||||
loading: false,
|
||||
table: {},
|
||||
dimension: [],
|
||||
|
Loading…
Reference in New Issue
Block a user