forked from github/dataease
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
f80b760326
@ -50,7 +50,7 @@ public class DataSetTableTaskController {
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除")
|
||||
@PostMapping("batchDelete/{id}")
|
||||
@PostMapping("/batchDelete")
|
||||
public void batchDelete(@RequestBody List<String> ids) {
|
||||
dataSetTableTaskService.batchDelete(ids);
|
||||
}
|
||||
|
@ -669,6 +669,85 @@ export const TYPE_CONFIGS = [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
render: 'antv',
|
||||
category: 'chart.chart_type_compare',
|
||||
value: 'bar-group',
|
||||
title: 'chart.chart_bar_group',
|
||||
icon: 'bar-group',
|
||||
properties: [
|
||||
'color-selector',
|
||||
'size-selector-ant-v',
|
||||
'label-selector-ant-v',
|
||||
'tooltip-selector-ant-v',
|
||||
'x-axis-selector-ant-v',
|
||||
'y-axis-selector-ant-v',
|
||||
'title-selector-ant-v',
|
||||
'legend-selector-ant-v'
|
||||
],
|
||||
propertyInner: {
|
||||
'color-selector': [
|
||||
'value',
|
||||
'colorPanel',
|
||||
'customColor',
|
||||
'alpha'
|
||||
],
|
||||
'size-selector-ant-v': [
|
||||
'barDefault',
|
||||
'barGap'
|
||||
],
|
||||
'label-selector-ant-v': [
|
||||
'show',
|
||||
'fontSize',
|
||||
'color',
|
||||
'position-v'
|
||||
],
|
||||
'tooltip-selector-ant-v': [
|
||||
'show',
|
||||
'textStyle'
|
||||
],
|
||||
'x-axis-selector-ant-v': [
|
||||
'show',
|
||||
'position',
|
||||
'name',
|
||||
'nameTextStyle',
|
||||
'splitLine',
|
||||
'axisForm',
|
||||
'axisLabel'
|
||||
],
|
||||
'y-axis-selector-ant-v': [
|
||||
'show',
|
||||
'position',
|
||||
'name',
|
||||
'nameTextStyle',
|
||||
'axisValue',
|
||||
'splitLine',
|
||||
'axisForm',
|
||||
'axisLabel'
|
||||
],
|
||||
'title-selector-ant-v': [
|
||||
'show',
|
||||
'title',
|
||||
'fontSize',
|
||||
'color',
|
||||
'hPosition',
|
||||
'isItalic',
|
||||
'isBolder',
|
||||
'remarkShow',
|
||||
'fontFamily',
|
||||
'letterSpace',
|
||||
'fontShadow'
|
||||
],
|
||||
'legend-selector-ant-v': [
|
||||
'show',
|
||||
'icon',
|
||||
'orient',
|
||||
'textStyle',
|
||||
'hPosition',
|
||||
'vPosition'
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
render: 'antv',
|
||||
category: 'chart.chart_type_compare',
|
||||
@ -2628,7 +2707,7 @@ export function getColors(chart, colors, reset) {
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if (chart.type.includes('bar') || chart.type.includes('line') || chart.type.includes('scatter') || chart.type.includes('radar')) {
|
||||
} else if ((chart.type.includes('bar') || chart.type.includes('line') || chart.type.includes('scatter') || chart.type.includes('radar') || chart.type.includes('area')) && !chart.type.includes('group')) {
|
||||
if (Object.prototype.toString.call(chart.yaxis) === '[object Array]') {
|
||||
series = JSON.parse(JSON.stringify(chart.yaxis))
|
||||
} else {
|
||||
@ -2644,6 +2723,22 @@ export function getColors(chart, colors, reset) {
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if (chart.type === 'bar-group') {
|
||||
// 拿到data中的category,并去重,然后构建seriesColor
|
||||
const data = chart.data.datas
|
||||
const s = []
|
||||
data.forEach((cur) => {
|
||||
if (s.indexOf(cur.category) < 0) {
|
||||
s.push(cur.category)
|
||||
}
|
||||
})
|
||||
for (let i = 0; i < s.length; i++) {
|
||||
seriesColors.push({
|
||||
name: s[i],
|
||||
color: colors[i % colors.length],
|
||||
isCustom: false
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if (chart.data) {
|
||||
const data = chart.data.datas
|
||||
|
@ -209,6 +209,7 @@
|
||||
:disabled="!fieldForm.name || !fieldForm.originName"
|
||||
type="primary"
|
||||
size="mini"
|
||||
:loading="loading"
|
||||
@click="saveCalcField"
|
||||
>{{ $t('dataset.confirm') }}
|
||||
</el-button>
|
||||
@ -302,7 +303,8 @@ export default {
|
||||
quotaData: [],
|
||||
functionData: [],
|
||||
tableFields: {},
|
||||
name2Auto: []
|
||||
name2Auto: [],
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -348,6 +350,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loading = false
|
||||
this.$refs.myCm.codemirror.on('keypress', () => {
|
||||
this.$refs.myCm.codemirror.showHint()
|
||||
})
|
||||
@ -446,8 +449,12 @@ export default {
|
||||
this.fieldForm.columnIndex = 0
|
||||
this.fieldForm.chartId = this.param.id
|
||||
}
|
||||
this.loading = true
|
||||
post('/chart/field/save/' + this.panelInfo.id, { ...this.fieldForm, originName: this.setNameIdTrans('name', 'id', originName) }).then(response => {
|
||||
this.closeCalcField()
|
||||
this.loading = false
|
||||
}).catch(res => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -171,7 +171,7 @@
|
||||
<el-row>
|
||||
<div class="dialog-button">
|
||||
<el-button size="mini" @click="closeCalcField">{{ $t('dataset.cancel') }}</el-button>
|
||||
<el-button :disabled="!fieldForm.name || !fieldForm.originName" type="primary" size="mini" @click="saveCalcField">{{ $t('dataset.confirm') }}</el-button>
|
||||
<el-button :disabled="!fieldForm.name || !fieldForm.originName" :loading="loading" type="primary" size="mini" @click="saveCalcField">{{ $t('dataset.confirm') }}</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-row>
|
||||
@ -259,7 +259,8 @@ export default {
|
||||
dimensionData: [],
|
||||
quotaData: [],
|
||||
name2Auto: [],
|
||||
functionData: []
|
||||
functionData: [],
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -299,6 +300,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loading = false
|
||||
this.$refs.myCm.codemirror.on('keypress', () => {
|
||||
this.$refs.myCm.codemirror.showHint()
|
||||
})
|
||||
@ -396,9 +398,13 @@ export default {
|
||||
this.fieldForm.tableId = this.param.id
|
||||
this.fieldForm.columnIndex = this.tableFields.dimensionList.length + this.tableFields.quotaList.length
|
||||
}
|
||||
this.loading = true
|
||||
post('/dataset/field/save', { ...this.fieldForm, originName: this.setNameIdTrans('name', 'id', originName) }).then(response => {
|
||||
localStorage.setItem('reloadDsData', 'true')
|
||||
this.closeCalcField()
|
||||
this.loading = false
|
||||
}).catch(res => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user