forked from github/dataease
Merge branch 'dev-v2' of github.com:dataease/dataease into dev-v2
This commit is contained in:
commit
025e43ea73
@ -1,5 +1,10 @@
|
||||
# Contributing
|
||||
|
||||
As a contributor, you should agree that:
|
||||
|
||||
a. The producer can adjust the open-source agreement to be more strict or relaxed as deemed necessary.
|
||||
b. Your contributed code may be used for commercial purposes, including but not limited to its cloud business operations.
|
||||
|
||||
## Create pull request
|
||||
PR are always welcome, even if they only contain small fixes like typos or a few lines of code. If there will be a significant effort, please document it as an issue and get a discussion going before starting to work on it.
|
||||
|
||||
|
@ -137,6 +137,12 @@ public class DefaultChartHandler extends AbstractChartPlugin {
|
||||
|
||||
Map<String, Object> mapTableNormal = ChartDataBuild.transTableNormal(xAxis, yAxis, view, calcResult.getOriginData(), extStack, desensitizationList);
|
||||
var drillFilters = filterResult.getFilterList().stream().filter(f -> f.getFilterType() == 1).collect(Collectors.toList());
|
||||
// 日期下钻替换回去
|
||||
drillFilters.forEach(f -> {
|
||||
if (CollectionUtils.isNotEmpty(f.getOriginValue())) {
|
||||
f.setValue(f.getOriginValue());
|
||||
}
|
||||
});
|
||||
var isDrill = CollectionUtils.isNotEmpty(drillFilters);
|
||||
// 构建结果
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
|
@ -127,7 +127,8 @@ public class ChartDataManage {
|
||||
List<DataSetRowPermissionsTreeDTO> rowPermissionsTree = permissionManage.getRowPermissionsTree(table.getId(), chartExtRequest.getUser());
|
||||
//将没有权限的列删掉
|
||||
List<String> dataeaseNames = columnPermissionFields.stream().map(DatasetTableFieldDTO::getDataeaseName).collect(Collectors.toList());
|
||||
|
||||
//计数字段
|
||||
dataeaseNames.add("*");
|
||||
AxisFormatResult formatResult = chartHandler.formatAxis(view);
|
||||
formatResult.getContext().put("desensitizationList", desensitizationList);
|
||||
var xAxis = formatResult.getAxisMap().get(ChartAxis.xAxis);
|
||||
@ -280,6 +281,7 @@ public class ChartDataManage {
|
||||
drillFilter.setFilterType(1);
|
||||
if (datasetTableField.getDeType() == 1) {
|
||||
drillFilter.setOperator("between");
|
||||
drillFilter.setOriginValue(Collections.singletonList(dim.getValue()));
|
||||
// 把value类似过滤组件处理,获得start time和end time
|
||||
Map<String, Long> stringLongMap = Utils.parseDateTimeValue(dim.getValue());
|
||||
drillFilter.setValue(Arrays.asList(String.valueOf(stringLongMap.get("startTime")), String.valueOf(stringLongMap.get("endTime"))));
|
||||
|
@ -8,7 +8,7 @@ import { i18n } from '@/plugins/vue-i18n'
|
||||
import * as Vue from 'vue'
|
||||
import axios from 'axios'
|
||||
import * as Pinia from 'pinia'
|
||||
import * as vueRouter from 'vue-router'
|
||||
import router from '@/router'
|
||||
import tinymce from 'tinymce/tinymce'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
|
||||
@ -107,7 +107,7 @@ onMounted(async () => {
|
||||
window['Vue'] = Vue
|
||||
window['Axios'] = axios
|
||||
window['Pinia'] = Pinia
|
||||
window['vueRouter'] = vueRouter
|
||||
window['vueRouter'] = router
|
||||
window['MittAll'] = useEmitt().emitter.all
|
||||
window['I18n'] = i18n
|
||||
if (!window.tinymce) {
|
||||
|
@ -47,7 +47,7 @@
|
||||
</el-button>
|
||||
<el-button
|
||||
class="m-button"
|
||||
v-if="optType === 'details' && authShow"
|
||||
v-if="optType === 'details' && authShow && viewInfo.type === 'table-pivot'"
|
||||
link
|
||||
icon="Download"
|
||||
size="middle"
|
||||
|
@ -209,8 +209,8 @@ defineExpose({
|
||||
<el-icon style="font-size: 16px">
|
||||
<Icon name="icon_info_colorful"></Icon>
|
||||
</el-icon>
|
||||
基于当前查询组件的查询条件,如果需要进行及联配置,需要满足以下条件:<br />
|
||||
1、展示类型为:文本下拉组件和数字下拉组件;2、选项值来源为:选择数据集<br />
|
||||
基于当前查询组件的查询条件,如果需要进行级联联配置,需要满足以下条件:<br />
|
||||
1. 展示类型:文本下拉组件和数字下拉组件;2. 选项值来源:选择数据集<br />
|
||||
</div>
|
||||
<el-button text @click="addCascadeBlock">
|
||||
<template #icon>
|
||||
|
@ -538,7 +538,9 @@ const openCascadeDialog = () => {
|
||||
name: next.name,
|
||||
queryId: next.id,
|
||||
fieldId: next.field.id,
|
||||
deType: next.field.deType
|
||||
deType: datasetMap[next.dataset.id].fields?.dimensionList.find(
|
||||
ele => ele.id === next.field.id
|
||||
)?.deType
|
||||
}
|
||||
return pre
|
||||
}, {})
|
||||
@ -765,7 +767,6 @@ const cancelValueSource = () => {
|
||||
valueSource.value = cloneDeep(curComponent.value.valueSource)
|
||||
if (!valueSource.value.length) {
|
||||
valueSource.value.push('')
|
||||
valueSource.value.push('')
|
||||
}
|
||||
manual.value.hide()
|
||||
}
|
||||
@ -963,7 +964,6 @@ const handleCondition = item => {
|
||||
valueSource.value = cloneDeep(curComponent.value.valueSource)
|
||||
if (!valueSource.value.length) {
|
||||
valueSource.value.push('')
|
||||
valueSource.value.push('')
|
||||
}
|
||||
parameterCompletion()
|
||||
nextTick(() => {
|
||||
|
@ -417,6 +417,7 @@ watch(
|
||||
watch(
|
||||
() => config.value.optionValueSource,
|
||||
(valNew, newOld) => {
|
||||
if (!props.isConfig) return
|
||||
if ([valNew, newOld].includes(2)) {
|
||||
selectValue.value = Array.isArray(selectValue.value) ? [] : undefined
|
||||
config.value.selectValue = cloneDeep(selectValue.value)
|
||||
|
@ -57,6 +57,22 @@ const emit = defineEmits(['onBasicStyleChange', 'onMiscChange'])
|
||||
const changeBasicStyle = (prop?: string, requestData = false) => {
|
||||
emit('onBasicStyleChange', { data: state.basicStyleForm, requestData }, prop)
|
||||
}
|
||||
const onAlphaChange = v => {
|
||||
const _v = parseInt(v)
|
||||
if (_v >= 0 && _v <= 100) {
|
||||
state.basicStyleForm.alpha = _v
|
||||
} else if (_v < 0) {
|
||||
state.basicStyleForm.alpha = 0
|
||||
} else if (_v > 100) {
|
||||
state.basicStyleForm.alpha = 100
|
||||
} else {
|
||||
const basicStyle = cloneDeep(props.chart.customAttr.basicStyle)
|
||||
const oldForm = defaultsDeep(basicStyle, cloneDeep(DEFAULT_BASIC_STYLE)) as ChartBasicStyle
|
||||
state.basicStyleForm.alpha = oldForm.alpha
|
||||
}
|
||||
changeBasicStyle('alpha')
|
||||
}
|
||||
|
||||
const changeMisc = prop => {
|
||||
emit('onMiscChange', { data: state.miscForm, requestData: true }, prop)
|
||||
}
|
||||
@ -275,7 +291,7 @@ onMounted(() => {
|
||||
:max="100"
|
||||
class="basic-input-number"
|
||||
:controls="false"
|
||||
@change="changeBasicStyle('alpha')"
|
||||
@change="onAlphaChange"
|
||||
>
|
||||
<template #suffix> % </template>
|
||||
</el-input>
|
||||
@ -521,7 +537,7 @@ onMounted(() => {
|
||||
:max="100"
|
||||
class="basic-input-number"
|
||||
:controls="false"
|
||||
@change="changeBasicStyle('alpha')"
|
||||
@change="onAlphaChange"
|
||||
>
|
||||
<template #suffix> % </template>
|
||||
</el-input>
|
||||
|
@ -47,7 +47,17 @@ export class RangeBar extends G2PlotChartView<BarOptions, Bar> {
|
||||
'showGap',
|
||||
'show'
|
||||
],
|
||||
'x-axis-selector': [...BAR_EDITOR_PROPERTY_INNER['x-axis-selector'], 'axisLabelFormatter']
|
||||
'x-axis-selector': [...BAR_EDITOR_PROPERTY_INNER['x-axis-selector'], 'axisLabelFormatter'],
|
||||
'y-axis-selector': [
|
||||
'name',
|
||||
'color',
|
||||
'fontSize',
|
||||
'axisLine',
|
||||
'splitLine',
|
||||
'axisForm',
|
||||
'axisLabel',
|
||||
'position'
|
||||
]
|
||||
}
|
||||
axis: AxisType[] = [...BAR_AXIS_TYPE, 'yAxisExt']
|
||||
protected baseOptions: BarOptions = {
|
||||
|
@ -423,9 +423,9 @@ export class ColumnLineMix extends G2PlotChartView<DualAxesOptions, DualAxes> {
|
||||
formatter: (text: string, item: any, index: number) => {
|
||||
let name = undefined
|
||||
if (item.viewId === 'left-axes-view' && text === 'value') {
|
||||
name = left[0]?.name
|
||||
name = left[0]?.categories[0]
|
||||
} else if (item.viewId === 'right-axes-view' && text === 'valueExt') {
|
||||
name = right[0]?.name
|
||||
name = right[0]?.categories[0]
|
||||
}
|
||||
item.id = item.id + '__' + index //防止重复的图例出现问题,但是左右轴如果有相同的怎么办
|
||||
if (name === undefined) {
|
||||
|
@ -282,7 +282,7 @@ const initTitle = () => {
|
||||
)
|
||||
}
|
||||
|
||||
state.title_remark.show = customStyle.text.remarkShow
|
||||
state.title_remark.show = customStyle.text.show && customStyle.text.remarkShow
|
||||
state.title_remark.remark = customStyle.text.remark
|
||||
}
|
||||
}
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 9eb62428789427f0287c11a61b799b59119cdc78
|
||||
Subproject commit 7b229ca2b545b19467f3b4b2db61ee5bd6ad1e41
|
@ -1,6 +1,7 @@
|
||||
package io.dataease.extensions.view.dto;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.dataease.extensions.datasource.dto.DatasetTableFieldDTO;
|
||||
import lombok.Data;
|
||||
|
||||
@ -19,5 +20,7 @@ public class ChartExtFilterDTO {
|
||||
private List<DatasetTableFieldDTO> datasetTableFieldList;
|
||||
private String dateStyle;
|
||||
private String datePattern;
|
||||
@JsonIgnore
|
||||
private List<String> originValue;
|
||||
private int filterType;// 0-过滤组件,1-下钻,2-联动,外部参数
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user