Merge branch 'dev' into pr@dev_one_dot_x

This commit is contained in:
dataeaseShu 2023-11-07 17:24:28 +08:00
commit c70e1b95a0
62 changed files with 617 additions and 84 deletions

View File

@ -357,6 +357,11 @@ public class ChartViewService {
}
List<ChartViewFieldDTO> extStack = gson.fromJson(view.getExtStack(), new TypeToken<List<ChartViewFieldDTO>>() {
}.getType());
if (CollectionUtils.isNotEmpty(xAxis) && StringUtils.equals(xAxis.get(0).getGroupType(), "q") && StringUtils.equalsIgnoreCase(view.getRender(), "antv")) {
List<ChartViewFieldDTO> xAxisExt = gson.fromJson(view.getXAxisExt(), new TypeToken<List<ChartViewFieldDTO>>() {
}.getType());
extStack.addAll(xAxisExt);
}
List<ChartViewFieldDTO> extBubble = gson.fromJson(view.getExtBubble(), new TypeToken<List<ChartViewFieldDTO>>() {
}.getType());
List<ChartFieldCustomFilterDTO> fieldCustomFilter = new ArrayList<ChartFieldCustomFilterDTO>();
@ -640,6 +645,9 @@ public class ChartViewService {
yAxis.addAll(sizeField);
}
List<ChartViewFieldDTO> extStack = gson.fromJson(view.getExtStack(), tokenType);
if (CollectionUtils.isNotEmpty(xAxis) && StringUtils.equals(xAxis.get(0).getGroupType(), "q") && StringUtils.equalsIgnoreCase(view.getRender(), "antv")) {
extStack.addAll(xAxisExt);
}
List<ChartViewFieldDTO> extBubble = gson.fromJson(view.getExtBubble(), tokenType);
List<ChartFieldCustomFilterDTO> fieldCustomFilter = gson.fromJson(view.getCustomFilter(), filterTokenType);
List<ChartViewFieldDTO> drill = gson.fromJson(view.getDrillFields(), tokenType);
@ -939,6 +947,8 @@ public class ChartViewService {
if (!checkDrillExist(xAxis, extStack, nextDrillField.getId(), view)) {
// get drill list first element's sort,then assign to nextDrillField
nextDrillField.setSort(getDrillSort(xAxis, drill.get(0)));
nextDrillField.setDrill(true);
if (isAntVScatterNumberXAxis) {
extStack.add(nextDrillField);
} else {

View File

@ -303,8 +303,10 @@ public class ChartDataBuild {
}
}
List<ChartViewFieldDTO> extGroupList = new ArrayList<>();
List<ChartViewFieldDTO> extBaseGroupList = new ArrayList<>();
if (xIsNumber) {
extGroupList.addAll(extGroup);
extBaseGroupList.addAll(extGroup.stream().filter(d -> !d.isDrill()).collect(Collectors.toList()));
}
@ -374,11 +376,20 @@ public class ChartDataBuild {
}
if (CollectionUtils.isNotEmpty(extGroup) && xIsNumber) { //有分组时其实就是第一个
String catalog = null;
if (isDrill) {
axisChartDataDTO.setCategory(row[extGroupList.size() - 1]);
catalog = row[extGroupList.size() - 1];
} else {
axisChartDataDTO.setCategory(row[0]);
catalog = row[0];
}
axisChartDataDTO.setCategory(StringUtils.defaultIfBlank(catalog, "null"));
if (!extBaseGroupList.isEmpty()) {
axisChartDataDTO.setField(row[extBaseGroupList.size() - 1]);
} else {
axisChartDataDTO.setField(yAxis.get(j).getName());
}
} else {
axisChartDataDTO.setCategory(yAxis.get(j).getName());
}

View File

@ -107,6 +107,13 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.32881 19.7336L4.01769 19.3947C2.92844 18.2083 2.11122 16.7932 1.63213 15.2477L1.49707 14.8121L3.54513 12L1.49707 9.18788L1.63213 8.7522C2.11122 7.20676 2.92844 5.79166 4.01769 4.60522L4.32881 4.26634L7.77063 4.64253L9.16859 1.4557L9.61685 1.35478C10.3936 1.17991 11.1916 1.09088 12.0005 1.09088C12.8093 1.09088 13.6073 1.17991 14.3841 1.35478L14.8323 1.4557L16.2303 4.64253L19.6721 4.26634L19.9832 4.60522C21.0725 5.79166 21.8897 7.20676 22.3688 8.7522L22.5038 9.18788L20.4558 12L22.5038 14.8121L22.3688 15.2477C21.8897 16.7932 21.0725 18.2083 19.9832 19.3947L19.6721 19.7336L16.2303 19.3574L14.8323 22.5442L14.3841 22.6452C13.6073 22.82 12.8093 22.9091 12.0005 22.9091C11.1916 22.9091 10.3936 22.82 9.61685 22.6452L9.16859 22.5442L7.77063 19.3574L4.32881 19.7336ZM7.8139 17.5236C8.46003 17.453 9.07723 17.8099 9.33833 18.4051L10.4588 20.9593C10.9641 21.0466 11.4792 21.0908 12.0005 21.0908C12.5217 21.0908 13.0368 21.0466 13.5421 20.9593L14.6626 18.4051C14.9237 17.8099 15.5409 17.453 16.187 17.5236L18.9412 17.8247C19.6064 17.024 20.1309 16.1142 20.4889 15.1338L18.8445 12.876C18.4643 12.3538 18.4643 11.646 18.8445 11.1239L20.4889 8.86603C20.1309 7.88562 19.6064 6.97584 18.9412 6.17518L16.187 6.47621C15.5409 6.54684 14.9237 6.18994 14.6626 5.59472L13.5421 3.04054C13.0368 2.95327 12.5217 2.90901 12.0005 2.90901C11.4792 2.90901 10.9641 2.95327 10.4588 3.04054L9.33833 5.59472C9.07723 6.18994 8.46003 6.54684 7.8139 6.47621L5.05969 6.17518C4.39449 6.97584 3.87002 7.88562 3.51199 8.86603L5.15637 11.1239C5.53664 11.646 5.53664 12.3538 5.15637 12.876L3.51199 15.1338C3.87002 16.1142 4.39449 17.024 5.05969 17.8247L7.8139 17.5236ZM12.0005 16.5454C9.49866 16.5454 7.47232 14.5094 7.47232 12C7.47232 9.49055 9.49866 7.45451 12.0005 7.45451C14.5023 7.45451 16.5286 9.49055 16.5286 12C16.5286 14.5094 14.5023 16.5454 12.0005 16.5454ZM12.0005 14.7273C13.4961 14.7273 14.7104 13.5072 14.7104 12C14.7104 10.4928 13.4961 9.27275 12.0005 9.27275C10.5048 9.27275 9.2905 10.4928 9.2905 12C9.2905 13.5072 10.5048 14.7273 12.0005 14.7273Z" fill="CurrentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.49999 8.41356C2.49999 8.54617 2.55267 8.67334 2.64643 8.76711C2.7402 8.86088 2.86738 8.91356 2.99999 8.91356H21.25C22.154 8.91356 22.594 7.80956 21.9375 7.18756L16.825 2.34406C16.7773 2.29887 16.7212 2.26352 16.6599 2.24001C16.5986 2.21651 16.5332 2.20533 16.4676 2.20709C16.4019 2.20885 16.3372 2.22354 16.2773 2.2503C16.2173 2.27706 16.1632 2.31538 16.118 2.36306L15.426 3.09356C15.3355 3.18903 15.2863 3.31629 15.289 3.44778C15.2918 3.57928 15.3462 3.7044 15.4405 3.79606L18.7405 7.00256H2.99999C2.93433 7.00256 2.86931 7.01549 2.80865 7.04062C2.74798 7.06575 2.69286 7.10257 2.64643 7.149C2.60001 7.19543 2.56318 7.25055 2.53805 7.31122C2.51292 7.37188 2.49999 7.4369 2.49999 7.50256V8.41356ZM2.74999 15.0001C1.84599 15.0001 1.40599 16.1041 2.06249 16.7261L7.17499 21.5701C7.22268 21.6152 7.27881 21.6505 7.34016 21.674C7.4015 21.6974 7.46687 21.7086 7.53253 21.7068C7.59818 21.705 7.66284 21.6902 7.7228 21.6634C7.78276 21.6366 7.83685 21.5983 7.88199 21.5506L8.56999 20.8251C8.61514 20.7774 8.65046 20.7212 8.67392 20.6599C8.69738 20.5985 8.70852 20.5332 8.70671 20.4675C8.7049 20.4019 8.69017 20.3372 8.66336 20.2772C8.63656 20.2173 8.5982 20.1632 8.55049 20.1181L5.25999 17.0001H21C21.1326 17.0001 21.2598 16.9474 21.3535 16.8536C21.4473 16.7598 21.5 16.6327 21.5 16.5001V15.5001C21.5 15.3674 21.4473 15.2403 21.3535 15.1465C21.2598 15.0527 21.1326 15.0001 21 15.0001H2.74999Z" fill="CurrentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -246,6 +246,9 @@ export function getLabel(chart) {
contentItems.push(valueFormatter(param.value, formatterCfg))
}
res = contentItems.join('\n')
} else if (chart.type === 'scatter' && xAxis && xAxis.length > 0 && xAxis[0].groupType === 'q') {
// 针对散点图
res = param.field
} else {
for (let i = 0; i < yAxis.length; i++) {
const f = yAxis[i]
@ -313,13 +316,18 @@ export function getTooltip(chart) {
const t = JSON.parse(JSON.stringify(customAttr.tooltip))
if (t.show) {
tooltip = {}
let xAxis, yAxis, extStack
let xAxis, yAxis, extStack, xAxisExt
try {
xAxis = JSON.parse(chart.xaxis)
} catch (e) {
xAxis = JSON.parse(JSON.stringify(chart.xaxis))
}
try {
xAxisExt = JSON.parse(chart.xaxisExt)
} catch (e) {
xAxisExt = JSON.parse(JSON.stringify(chart.xaxisExt))
}
try {
yAxis = JSON.parse(chart.yaxis)
} catch (e) {
@ -467,14 +475,18 @@ export function getTooltip(chart) {
}
//
if (chart.type === 'scatter' && xAxis && xAxis.length > 0 && xAxis[0].groupType === 'q') {
tooltip.fields = ['x', 'category', 'value', 'group']
tooltip.fields = ['x', 'category', 'value', 'group', 'field']
tooltip.customContent = (title, data) => {
const key1 = xAxis[0]?.name
let key2, v1, v2
let key2, v1, v2, subGroup
let hasSubGroup = false
if (data && data.length > 0) {
title = data[0].data.category
key2 = data[0].data.group
subGroup = data[0].data.field
hasSubGroup = xAxisExt.length > 0
const fx = xAxis[0]
if (fx.formatterCfg) {
@ -499,6 +511,12 @@ export function getTooltip(chart) {
return `
<div>
<div class="g2-tooltip-title">${title}</div>
` +
(hasSubGroup
? `<div class="g2-tooltip-item">
<span class="g2-tooltip-name">${xAxisExt[0].name}:</span><span class="g2-tooltip-value">${subGroup}</span>
</div>` : ``) +
`
<div class="g2-tooltip-item">
<span class="g2-tooltip-name">${key1}:</span><span class="g2-tooltip-value">${v1}</span>
</div>

View File

@ -3452,7 +3452,43 @@ export function getColors(chart, colors, reset) {
isCustom: false
})
}
} else if (includesAny(chart.type, 'bar', 'scatter', 'radar', 'area') && !chart.type.includes('group')) {
} else if (chart.type === 'scatter') {
const xAxis = JSON.parse(chart.xaxis)
if (chart.data && chart.render === 'antv' && xAxis && xAxis.length > 0 && xAxis[0].groupType === 'q') {
const data = chart.data.data
const groups = []
for (let i = 0; i < data.length; i++) {
const d = data[i]
if (!groups.includes(d.category)) {
groups.push(d.category)
}
}
for (let i = 0; i < groups.length; i++) {
const s = groups[i]
seriesColors.push({
name: s,
color: colors[i % colors.length],
isCustom: false
})
}
} else {
if (Object.prototype.toString.call(chart.yaxis) === '[object Array]') {
series = JSON.parse(JSON.stringify(chart.yaxis))
} else {
series = JSON.parse(chart.yaxis)
}
if (series) {
for (let i = 0; i < series.length; i++) {
const s = series[i]
seriesColors.push({
name: s.name,
color: colors[i % colors.length],
isCustom: false
})
}
}
}
} else if ((includesAny(chart.type, 'bar', 'radar', 'area')) && !chart.type.includes('group')) {
if (Object.prototype.toString.call(chart.yaxis) === '[object Array]') {
series = JSON.parse(JSON.stringify(chart.yaxis))
} else {
@ -3499,7 +3535,6 @@ export function getColors(chart, colors, reset) {
// if (customSortData && customSortData.length > 0) {
// data = customSort(customSortData, data)
// }
for (let i = 0; i < data.length; i++) {
const s = data[i]
seriesColors.push({

View File

@ -117,6 +117,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -221,6 +221,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -225,6 +225,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -251,6 +251,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -247,6 +247,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -147,9 +147,9 @@ export default {
</script>
<style scoped>
.el-divider--horizontal {
margin: 10px 0
}
.el-divider--horizontal {
margin: 10px 0
}
.shape-item{
padding: 6px;
border: none;
@ -165,6 +165,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -303,6 +303,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -423,4 +423,12 @@ span {
.dialog-css ::v-deep .el-dialog__body {
padding: 10px 20px 20px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
</style>

View File

@ -478,6 +478,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -465,6 +465,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -465,6 +465,14 @@ export default {
font-size: 12px;
line-height: 38px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}

View File

@ -454,6 +454,14 @@ export default {
justify-content: space-between;
align-items: center;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.form-item-slider ::v-deep .el-form-item__label{
font-size: 12px;
line-height: 38px;

View File

@ -471,6 +471,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -461,6 +461,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -7,6 +7,7 @@
:model="thresholdForm"
label-width="80px"
size="mini"
@submit.native.prevent
>
<el-form-item
:label="$t('chart.threshold_range')+'(%)'"
@ -46,6 +47,7 @@
:model="thresholdForm"
label-width="80px"
size="mini"
@submit.native.prevent
>
<el-form-item
:label="$t('chart.threshold_range')+'(%)'"

View File

@ -120,6 +120,7 @@
v-show="showProperty('customColor')"
class="custom-color-style"
>
aaa
<div
v-for="(item,index) in colorForm.seriesColors"
:key="index"
@ -640,6 +641,13 @@ export default {
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;
}

View File

@ -361,6 +361,13 @@ export default {
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;
}

View File

@ -330,6 +330,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -422,14 +422,14 @@ export default {
</script>
<style scoped>
.shape-item{
padding: 6px;
border: none;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.shape-item{
padding: 6px;
border: none;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.form-item-slider ::v-deep .el-form-item__label{
font-size: 12px;
line-height: 38px;
@ -437,6 +437,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -1211,6 +1211,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -1788,6 +1788,13 @@ export default {
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;
}

View File

@ -220,6 +220,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -165,6 +165,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -469,6 +469,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -105,11 +105,12 @@
<span class="el-dropdown-link">
<el-button
:title="$t('dataset.field_manage')"
icon="el-icon-setting"
type="text"
size="mini"
style="float: right;width: 20px;margin-left: 4px;"
/>
>
<svg-icon icon-class="icon-setting" />
</el-button>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
@ -129,12 +130,13 @@
</el-dropdown>
<el-button
:title="$t('chart.change_ds')"
icon="el-icon-refresh"
type="text"
size="mini"
style="float: right;width: 20px;margin-left: 4px;"
@click="changeDs"
/>
>
<svg-icon icon-class="icon_switch_outlined" />
</el-button>
</div>
<div
@ -920,6 +922,67 @@
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span>
</div>
</el-row>
<el-row
v-if="view.type === 'scatter' && view.render === 'antv'"
class="padding-lr"
>
<span class="data-area-label">
<span>
{{ $t('chart.chart_group') }}
</span>
/
<span>{{ $t('chart.dimension') }}</span>
<el-tooltip
class="item"
effect="dark"
placement="bottom"
>
<div slot="content">
{{ $t('chart.scatter_group_tip') }}
</div>
<i
class="el-icon-info"
style="cursor: pointer;color: #606266;"
/>
</el-tooltip>
<i
class="el-icon-arrow-down el-icon-delete data-area-clear"
@click="clearData('xaxisExt')"
/>
</span>
<draggable
v-model="view.xaxisExt"
group="drag"
animation="300"
:move="onMove"
class="drag-block-style"
@add="addXaxisExt"
@update="calcData(true)"
>
<transition-group class="draggable-group">
<dimension-ext-item
v-for="(item,index) in view.xaxisExt"
:key="item.id"
:param="param"
:index="index"
:item="item"
:dimension-data="dimension"
:quota-data="quota"
:chart="chart"
@onDimensionItemChange="dimensionItemChange"
@onDimensionItemRemove="dimensionItemRemove"
@editItemFilter="showDimensionEditFilter"
@onNameEdit="showRename"
/>
</transition-group>
</draggable>
<div
v-if="!view.xaxisExt || view.xaxisExt.length === 0"
class="drag-placeholder-style"
>
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span>
</div>
</el-row>
<!--extBubble-->
<el-row
v-if="view.type && view.type.includes('scatter')"
@ -2084,31 +2147,34 @@ export default {
},
watchChartTypeChangeObj(newVal, oldVal) {
this.view.isPlugin = newVal.isPlugin
if (newVal.id === oldVal.id && newVal.type !== oldVal.type && oldVal.type === 'table-info' && this.view.xaxis.length > 0) {
//
this.$message({
showClose: true,
message: this.$t('chart.table_info_switch'),
type: 'warning'
})
this.view.xaxis = []
}
if (newVal.id === oldVal.id && newVal.type !== oldVal.type) {
this.view.senior.threshold = {}
}
if (newVal.type === oldVal.type && newVal.render === oldVal.render && newVal.isPlugin === oldVal.isPlugin) {
return
}
if (newVal.render === 'antv' && newVal.type === 'chart-mix') {
// antv
this.view.xaxis.forEach(x => {
x.customSort = []
x.sort = 'none'
})
}
if (oldVal.id !== 'echart') {
this.setChartDefaultOptions()
this.calcData(true, 'chart', true, newVal.type !== oldVal.type, newVal.render !== oldVal.render)
// render
if (newVal.id === oldVal.id) {
if (newVal.type !== oldVal.type && oldVal.type === 'table-info' && this.view.xaxis.length > 0) {
//
this.$message({
showClose: true,
message: this.$t('chart.table_info_switch'),
type: 'warning'
})
this.view.xaxis = []
}
if (newVal.type !== oldVal.type) {
this.view.senior.threshold = {}
}
if (newVal.render === 'antv' && newVal.type === 'chart-mix') {
// antv
this.view.xaxis.forEach(x => {
x.customSort = []
x.sort = 'none'
})
}
if (newVal.type !== oldVal.type || newVal.render !== oldVal.render) {
this.setChartDefaultOptions()
this.calcData(true, 'chart', true, newVal.type !== oldVal.type, newVal.render !== oldVal.render)
}
}
}
},
@ -3152,7 +3218,7 @@ export default {
this.dragCheckType(this.view.xaxisExt, 'd')
}
this.dragMoveDuplicate(this.view.xaxisExt, e)
if ((this.view.type === 'map' || this.view.type === 'word-cloud') && this.view.xaxisExt.length > 1) {
if ((this.view.type === 'map' || this.view.type === 'word-cloud' || this.view.type === 'scatter') && this.view.xaxisExt.length > 1) {
this.view.xaxisExt = [this.view.xaxisExt[0]]
}
this.calcData(true)

View File

@ -766,6 +766,16 @@ span {
font-size: 12px;
}
.form-item {
::v-deep .el-form-item__content {
.el-checkbox {
.el-checkbox__label {
font-size: 12px;
}
}
}
}
.no-properties {
width: 100%;
text-align: center;

View File

@ -231,6 +231,12 @@ export default {
.form-item ::v-deep .el-form-item__label {
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;

View File

@ -86,6 +86,14 @@ export default {
.form-item>>>.el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -8,7 +8,7 @@
placement="bottom"
width="400"
trigger="click"
>
<div style="padding: 6px 10px;">
<div>
@ -46,7 +46,7 @@
</el-popover>
</el-form-item>
<el-form-item :label="$t('chart.not_alpha')" class="form-item form-item-slider">
<el-slider v-model="colorForm.alpha" show-input :show-input-controls="false" input-size="mini" @change="changeColorCase" />
@ -255,6 +255,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -6,7 +6,7 @@
<el-checkbox v-model="labelForm.show" @change="changeLabelAttr">{{ $t('chart.show') }}</el-checkbox>
</el-form-item>
<div v-show="labelForm.show">
<el-form-item :label="$t('chart.text_fontsize')" class="form-item">
<el-select v-model="labelForm.fontSize" :placeholder="$t('chart.text_fontsize')" size="mini" @change="changeLabelAttr">
<el-option v-for="option in fontSize" :key="option.value" :label="option.name" :value="option.value" />
@ -37,7 +37,7 @@
</div>
</el-form>
</el-col>
</div>
</template>
@ -143,6 +143,14 @@ export default {
.form-item>>>.el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -86,6 +86,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -8,7 +8,7 @@
placement="bottom"
width="400"
trigger="click"
>
<div style="padding: 6px 10px;">
<div>
@ -66,7 +66,7 @@
<el-form-item v-show="(chart.type && chart.type.includes('table')) || sourceType==='panelTable'" :label="$t('chart.table_border_color')" class="form-item">
<el-color-picker v-model="colorForm.tableBorderColor" class="color-picker-style" :predefine="predefineColors" @change="changeColorCase" />
</el-form-item>
</div>
<el-form-item v-show="chart.type && !chart.type.includes('text')" :label="$t('chart.not_alpha')" class="form-item form-item-slider">
@ -284,6 +284,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -181,6 +181,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -94,6 +94,13 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -142,6 +142,13 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -137,6 +137,13 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -86,6 +86,14 @@ export default {
.form-item>>>.el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -265,6 +265,14 @@ export default {
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;
}

View File

@ -267,6 +267,13 @@ export default {
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;
}

View File

@ -86,6 +86,14 @@ export default {
.form-item>>>.el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -265,6 +265,13 @@ export default {
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;
}

View File

@ -195,6 +195,13 @@ export default {
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;
}

View File

@ -86,6 +86,14 @@ export default {
.form-item>>>.el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -265,6 +265,13 @@ export default {
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;
}

View File

@ -234,6 +234,13 @@ export default {
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item {
padding: 0 20px;
}

View File

@ -143,6 +143,14 @@ export default {
.form-item>>>.el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -86,6 +86,14 @@ export default {
.form-item>>>.el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -9,7 +9,7 @@
<el-radio label="dark">{{$t('plugin_view_symbol_map.dark')}}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</el-col>
</div>
@ -83,6 +83,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -8,7 +8,7 @@
placement="bottom"
width="400"
trigger="click"
>
<div style="padding: 6px 10px;">
<div>
@ -46,7 +46,7 @@
</el-popover>
</el-form-item>
<el-form-item :label="$t('chart.not_alpha')" class="form-item form-item-slider">
<el-slider v-model="colorForm.alpha" show-input :show-input-controls="false" input-size="mini" @change="changeColorCase" />
@ -255,6 +255,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -222,6 +222,14 @@ export default {
.form-item ::v-deep .el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -143,6 +143,14 @@ export default {
.form-item>>>.el-form-item__label{
font-size: 12px;
}
.form-item ::v-deep .el-checkbox__label {
font-size: 12px;
}
.form-item ::v-deep .el-radio__label {
font-size: 12px;
}
.el-select-dropdown__item{
padding: 0 20px;
}

View File

@ -550,14 +550,17 @@ export default {
},
getMapTheme(chart) {
let theme = 'light'
let theme = 'normal'
if (chart.customStyle) {
const customStyle = JSON.parse(chart.customStyle)
if (customStyle.baseMapStyle && customStyle.baseMapStyle.baseMapTheme) {
theme = customStyle.baseMapStyle.baseMapTheme
}
}
return theme
if (theme === 'light') {
theme = 'normal'
}
return `amap://styles/${theme}`
},

View File

@ -57,21 +57,32 @@ function usage() {
}
function _healthcheck() {
echo
for b in {1..30}
container_name=$(grep "container_name" $DE_BASE/dataease/docker-compose.yml | awk -F': ' '{print $2}')
sleep 1
if [ -z $(docker ps --filter "name=$container_name" -q) ];then
echo "未找到容器 $container_name请检查配置文件。"
exit 1
fi
for b in {1..90}
do
sleep 3
http_code=$(curl -sILw "%{http_code}\n" http://localhost:${DE_PORT} -o /dev/null)
if [[ $http_code == 000 ]];then
echo "DataEase 服务状态 : 正在启动"
elif [[ $http_code == 200 ]];then
echo "DataEase 服务状态 : 正常运行"
break;
sleep 1
read status healthy<<<$(docker inspect $container_name --format '{{.State.Status}} {{.State.Health.Status}}')
if [[ "$healthy" == "starting" ]];then
printf "\rDataEase 服务状态 : 正在启动 ... %3ds" $b
elif [[ "$status" == "running" ]] && [[ "$healthy" == "healthy" ]];then
printf "\rDataEase 服务状态 : 正常运行 "
echo
return;
else
echo
echo -e "DataEase 服务状态 : \033[31m无法访问\033[0m"
exit 1
fi
done
echo
echo "【警告】服务在等待时间内未完全启动!请稍后使用 dectl status 检查服务运行状况。"
echo
}
function status() {
echo

View File

@ -365,25 +365,5 @@ log "启动服务"
dectl reload | tee -a ${CURRENT_DIR}/install.log
dectl status 2>&1 | tee -a ${CURRENT_DIR}/install.log
for b in {1..30}
do
sleep 3
http_code=$(curl -sILw "%{http_code}\n" http://localhost:${DE_PORT} -o /dev/null)
if [[ $http_code == 000 ]];then
log "服务启动中,请稍候 ..."
elif [[ $http_code == 200 ]];then
log "服务启动成功!"
break;
else
log "服务启动出错!"
exit 1
fi
done
if [[ $http_code != 200 ]];then
log "【警告】服务在等待时间内未完全启动!请稍后使用 dectl status 检查服务运行状况。"
fi
echo -e "======================= 安装完成 =======================\n" 2>&1 | tee -a ${CURRENT_DIR}/install.log
echo -e "请通过以下方式访问:\n URL: http://\$LOCAL_IP:$DE_PORT\n 用户名: admin\n 初始密码: dataease" 2>&1 | tee -a ${CURRENT_DIR}/install.log

View File

@ -16,4 +16,6 @@ public class ChartViewFieldDTO extends ChartViewFieldBaseDTO implements Serializ
private List<String> customSort;
private String busiType;
private boolean drill;
}