Merge branch 'dev' of github.com:dataease/dataease into dev

This commit is contained in:
taojinlong 2022-06-27 17:16:53 +08:00
commit 313942b26e
27 changed files with 103 additions and 104 deletions

View File

@ -127,6 +127,7 @@ public class ChartDataBuild {
}
}
axisChartDataDTO.setField(a.toString());
axisChartDataDTO.setName(a.toString());
axisChartDataDTO.setCategory(row[xAxis.size()]);
List<ChartDimensionDTO> dimensionList = new ArrayList<>();
@ -177,6 +178,7 @@ public class ChartDataBuild {
for (int i = xAxis.size(); i < xAxis.size() + yAxis.size(); i++) {
AxisChartDataAntVDTO axisChartDataDTO = new AxisChartDataAntVDTO();
axisChartDataDTO.setField(a.toString());
axisChartDataDTO.setName(a.toString());
List<ChartDimensionDTO> dimensionList = new ArrayList<>();
List<ChartQuotaDTO> quotaList = new ArrayList<>();
@ -232,6 +234,7 @@ public class ChartDataBuild {
for (int i = xAxis.size(); i < xAxis.size() + yAxis.size(); i++) {
AxisChartDataAntVDTO axisChartDataDTO = new AxisChartDataAntVDTO();
axisChartDataDTO.setField(a.toString());
axisChartDataDTO.setName(a.toString());
List<ChartDimensionDTO> dimensionList = new ArrayList<>();
List<ChartQuotaDTO> quotaList = new ArrayList<>();

View File

@ -4,8 +4,10 @@
v-model="selectValue"
:class="classId"
popper-class="VisualSelects"
no-match-text=" "
v-bind="$attrs"
v-on="$listeners"
@change="visualChange"
@visible-change="popChange"
>
<el-option v-for="item in options" :key="item.id" :label="item.text" :value="item.id" />
@ -54,6 +56,9 @@ export default {
}
},
watch: {
value(val) {
this.selectValue = val
},
selectValue(val) {
this.$emit('update', val)
if (!val) {
@ -102,6 +107,7 @@ export default {
)
this.scrollbar = document.querySelector(`.${this.classId} .el-select-dropdown .el-scrollbar`)
this.slectBoxDom = document.querySelector(`.${this.classId} .el-select-dropdown__wrap`)
if (!this.slectBoxDom || !this.slectBoxDom.style) return
this.slectBoxDom.style.display = 'flex'
this.slectBoxDom.style.flexDirection = 'row'
this.domList = selectDom.querySelector(
@ -117,6 +123,7 @@ export default {
},
callback() {
if (!this.scrollbar) return
const scrollTop = this.scrollbar.scrollTop
this.startIndex = parseInt(scrollTop / this.itemHeight)
this.endIndex = this.startIndex + this.maxLength
@ -129,6 +136,9 @@ export default {
this.resetList()
this.reCacularHeight()
},
visualChange(val) {
this.$emit('visual-change', val)
}
}

View File

@ -8,6 +8,7 @@
<script>
import { mapState } from 'vuex'
import bus from '@/utils/bus'
export default {
computed: {
@ -27,6 +28,7 @@ export default {
methods: {
clearAllLinkage() {
this.$store.commit('clearPanelLinkageInfo')
bus.$emit('clear_panel_linkage', { viewId: 'all' })
}
}
}

View File

@ -196,23 +196,6 @@ export default {
// resize
this.$emit('resizeView')
},
// edit() {
// //
// this.$store.dispatch('panel/setComponentDataTemp', JSON.stringify(this.componentData))
// this.$store.dispatch('panel/setCanvasStyleDataTemp', JSON.stringify(this.canvasStyleData))
// if (this.curComponent.type === 'view') {
// this.$store.dispatch('chart/setViewId', null)
// this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId)
// bus.$emit('PanelSwitchComponent', { name: 'ChartEdit', param: { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' }})
// }
// if (this.curComponent.type === 'custom') {
// bus.$emit('component-dialog-edit')
// }
// //
// if (this.curComponent.type === 'v-text' || this.curComponent.type === 'rect-shape') {
// bus.$emit('component-dialog-style')
// }
// },
edit() {
if (this.curComponent.type === 'custom') {
bus.$emit('component-dialog-edit')
@ -240,6 +223,7 @@ export default {
}
}
})
bus.$emit('clear_panel_linkage', { viewId: this.element.propValue.viewId })
},
linkJumpSet() {
this.$emit('linkJumpSet')

View File

@ -492,6 +492,11 @@ export default {
bus.$on('onThemeAttrChange', (param) => {
this.optFromBatchSingleProp(param)
})
bus.$on('clear_panel_linkage', (param) => {
if (param.viewId === 'all' || param.viewId === this.element.propValue.viewId) {
this.$refs[this.element.propValue.id].reDrawView()
}
})
},
addViewTrackFilter(linkageParam) {

View File

@ -130,6 +130,9 @@ export default {
}
})
},
beforeDestroy() {
bus.$off('reset-default-value')
},
methods: {
onBlur() {
this.onFocus = false

View File

@ -2,12 +2,12 @@
<el-input
v-if="element.options!== null && element.options.attrs!==null"
ref="de-input-search"
v-model="value"
resize="vertical"
:placeholder="$t(element.options.attrs.placeholder)"
:size="size"
class="de-range-tag"
ref="de-input-search"
@input="valueChange"
@keypress.enter.native="search"
@dblclick="setEdit"
@ -78,6 +78,9 @@ export default {
}
})
},
beforeDestroy() {
bus.$off('reset-default-value')
},
methods: {
search() {
if (!this.inDraw) {

View File

@ -3,11 +3,11 @@
<el-form v-if="element.options!== null && element.options.attrs!==null" ref="form" :model="form" :rules="rules">
<div class="de-number-range-container">
<el-form-item prop="min">
<el-input ref='de-number-range-min' v-model="form.min" :placeholder="$t(element.options.attrs.placeholder_min)" :size="size" @input="inputChange" @change="handleMinChange" />
<el-input ref="de-number-range-min" v-model="form.min" :placeholder="$t(element.options.attrs.placeholder_min)" :size="size" @input="inputChange" @change="handleMinChange" />
</el-form-item>
<span>{{ $t('denumberrange.split_placeholder') }}</span>
<el-form-item prop="max">
<el-input ref='de-number-range-max' v-model="form.max" :placeholder="$t(element.options.attrs.placeholder_max)" :size="size" @input="inputChange" @change="handleMaxChange" />
<el-input ref="de-number-range-max" v-model="form.max" :placeholder="$t(element.options.attrs.placeholder_max)" :size="size" @input="inputChange" @change="handleMaxChange" />
</el-form-item>
</div>
</el-form>
@ -115,6 +115,9 @@ export default {
}
})
},
beforeDestroy() {
bus.$off('reset-default-value')
},
methods: {
searchWithKey(index) {
this.timeMachine = setTimeout(() => {

View File

@ -17,6 +17,7 @@
@change="changeValue"
@focus="setOptionWidth"
@blur="onBlur"
@visual-change="visualChange"
>
<el-option
v-for="item in templateDatas || datas"
@ -37,7 +38,7 @@ import { multFieldValues, linkMultFieldValues } from '@/api/dataset/dataset'
import bus from '@/utils/bus'
import { getLinkToken, getToken } from '@/utils/auth'
import customInput from '@/components/widget/DeWidget/customInput'
import { textSelectWidget } from '@/components/widget/DeWidget/serviceNameFn.js'
import { textSelectWidget } from '@/components/widget/DeWidget/serviceNameFn.js'
export default {
components: { ElVisualSelect },
@ -182,6 +183,9 @@ export default {
}
})
},
beforeDestroy() {
bus.$off('reset-default-value')
},
methods: {
onBlur() {
@ -189,7 +193,7 @@ export default {
},
handleElTagStyle() {
setTimeout(() => {
textSelectWidget(this.$refs["deSelect"].$el, this.element.style)
textSelectWidget(this.$refs['deSelect'].$el, this.element.style)
}, 50)
},
initLoad() {
@ -211,6 +215,9 @@ export default {
this.changeValue(this.value)
}
},
visualChange(value) {
this.value = value
},
changeValue(value) {
if (!this.inDraw) {
if (value === null) {
@ -240,7 +247,6 @@ export default {
},
setCondition() {
console.log(this.element)
const param = {
component: this.element,
value: this.formatFilterValue(),

View File

@ -211,6 +211,9 @@ export default {
}
})
},
beforeDestroy() {
bus.$off('reset-default-value')
},
methods: {
changeInputStyle() {

View File

@ -27,7 +27,7 @@ import bus from '@/utils/bus'
import { getLinkToken, getToken } from '@/utils/auth'
import ElTreeSelect from '@/components/ElTreeSelect'
import customInput from '@/components/widget/DeWidget/customInput'
import { textSelectWidget } from '@/components/widget/DeWidget/serviceNameFn.js'
import { textSelectWidget } from '@/components/widget/DeWidget/serviceNameFn.js'
export default {
components: { ElTreeSelect },
@ -212,6 +212,9 @@ export default {
}
})
},
beforeDestroy() {
bus.$off('reset-default-value')
},
methods: {
onFoucs() {
@ -221,7 +224,7 @@ export default {
},
change() {
setTimeout(() => {
console.log(123, this.$refs.deSelectTree.$refs.select.$el);
console.log(123, this.$refs.deSelectTree.$refs.select.$el)
textSelectWidget(this.$refs.deSelectTree.$refs.select.$el, this.element.style)
}, 50)
},

View File

@ -481,7 +481,6 @@ const data = {
item.linkageFilters.splice(0, item.linkageFilters.length)
}
})
// state.styleChangeTimes++
},
setDragComponentInfo(state, dragComponentInfo) {
dragComponentInfo['shadowStyle'] = {

View File

@ -43,12 +43,6 @@ export function baseBarOptionAntV(plot, container, chart, action, isGroup, isSta
slider: slider,
annotations: analyse,
interactions: [
{
type: 'element-active', cfg: {
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
},
{
type: 'legend-active', cfg: {
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],

View File

@ -24,12 +24,6 @@ export function baseFunnelOptionAntV(plot, container, chart, action) {
legend: legend,
conversionTag: false,
interactions: [
{
type: 'element-active', cfg: {
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
},
{
type: 'legend-active', cfg: {
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],

View File

@ -44,12 +44,6 @@ export function baseLineOptionAntV(plot, container, chart, action) {
slider: slider,
annotations: analyse,
interactions: [
{
type: 'element-active', cfg: {
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
},
{
type: 'legend-active', cfg: {
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],

View File

@ -54,18 +54,6 @@ export function baseMixOptionAntV(plot, container, chart, action) {
xAxis: i > 0 ? false : xAxis,
yAxis: (i >= JSON.parse(chart.yaxis).length) ? yAxisExt : yAxis,
interactions: [
{
type: 'element-active', cfg: {
start: [{
trigger: 'element:mouseenter',
action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer']
}],
end: [{
trigger: 'element:mouseleave',
action: ['element-highlight:reset', 'element-active:reset', 'cursor:default']
}]
}
},
{
type: 'legend-active', cfg: {
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],

View File

@ -44,12 +44,6 @@ export function basePieOptionAntV(plot, container, chart, action) {
}
},
interactions: [
{
type: 'element-active', cfg: {
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
},
{
type: 'legend-active', cfg: {
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],
@ -133,12 +127,6 @@ export function basePieRoseOptionAntV(plot, container, chart, action) {
}
},
interactions: [
{
type: 'element-active', cfg: {
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
},
{
type: 'legend-active', cfg: {
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],

View File

@ -41,12 +41,6 @@ export function baseRadarOptionAntV(plot, container, chart, action) {
}
},
interactions: [
{
type: 'element-active', cfg: {
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
},
{
type: 'legend-active', cfg: {
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],

View File

@ -47,12 +47,6 @@ export function baseScatterOptionAntV(plot, container, chart, action) {
lineWidth: 0
},
interactions: [
{
type: 'element-active', cfg: {
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
},
{
type: 'legend-active', cfg: {
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],

View File

@ -24,12 +24,6 @@ export function baseTreemapOptionAntV(plot, container, chart, action) {
tooltip: tooltip,
legend: legend,
interactions: [
{
type: 'element-active', cfg: {
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
},
{
type: 'legend-active', cfg: {
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],

View File

@ -69,12 +69,6 @@ export function baseWaterfallOptionAntV(plot, container, chart, action) {
fallingFill: theme.styleSheet.paletteQualitative10[1],
total: total,
interactions: [
{
type: 'element-active', cfg: {
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
},
{
type: 'tooltip', cfg: {
start: [{ trigger: 'interval:mousemove', action: 'tooltip:show' }],

View File

@ -30,12 +30,6 @@ export function baseWordCloudOptionAntV(plot, container, chart, action) {
tooltip: tooltip,
legend: false,
interactions: [
{
type: 'element-active', cfg: {
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
}
}
]
}

View File

@ -82,7 +82,10 @@ export default {
background: ''
},
title_show: true,
antVRenderStatus: false
antVRenderStatus: false,
linkageActiveParam: null,
linkageActiveHistory: false
}
},
@ -115,6 +118,43 @@ export default {
this.preDraw()
},
methods: {
reDrawView() {
this.linkageActiveHistory = false
this.myChart.render()
},
linkageActivePre() {
if (this.linkageActiveHistory) {
this.reDrawView()
}
this.$nextTick(() => {
this.linkageActive()
})
},
linkageActive() {
this.linkageActiveHistory = true
this.myChart.setState('selected', (param) => {
if (Array.isArray(param)) {
return false
} else {
if (this.checkSelected(param)) {
return true
}
}
})
this.myChart.setState('inactive', (param) => {
if (Array.isArray(param)) {
return false
} else {
if (!this.checkSelected(param)) {
return true
}
}
})
},
checkSelected(param) {
return (this.linkageActiveParam.name.indexOf(param.name) > -1) &&
(this.linkageActiveParam.category === param.category)
},
preDraw() {
this.initTitle()
this.calcHeightDelay()
@ -186,6 +226,9 @@ export default {
if (this.antVRenderStatus) {
this.myChart.render()
if (this.linkageActiveHistory) {
this.linkageActive()
}
}
this.setBackGroundBorder()
},
@ -196,6 +239,10 @@ export default {
} else {
this.pointParam = param.data
}
this.linkageActiveParam = {
category: this.pointParam.data.category ? this.pointParam.data.category : 'NO_DATA',
name: this.pointParam.data.name ? this.pointParam.data.name : 'NO_DATA'
}
if (this.trackMenu.length < 2) { //
this.trackClick(this.trackMenu[0])
} else { //
@ -236,11 +283,13 @@ export default {
dimensionList: this.pointParam.data.dimensionList,
quotaList: this.pointParam.data.quotaList
}
switch (trackAction) {
case 'drill':
this.$emit('onChartClick', this.pointParam)
break
case 'linkage':
this.linkageActivePre()
this.$store.commit('addViewTrackFilter', linkageParam)
break
case 'jump':

View File

@ -389,7 +389,7 @@ export default {
this.myChart.store.set('scrollY', this.scrollTop)
this.myChart.render()
if (senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) {
if (senior.scroll && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) {
const rowHeight = customAttr.size.tableItemHeight
const headerHeight = customAttr.size.tableTitleHeight

View File

@ -382,7 +382,7 @@ export default {
})
}, 0)
if (senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) {
if (senior.scrollCfg && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) {
let rowHeight = customAttr.size.tableItemHeight
if (rowHeight < 36) {
rowHeight = 36

View File

@ -714,7 +714,7 @@
@onFunctionCfgChange="onFunctionCfgChange"
/>
</el-collapse-item>
<el-collapse-item v-if="false && view.type && (view.type.includes('table'))" name="scroll" :title="$t('chart.scroll_cfg')">
<el-collapse-item v-if="view.type && (view.type.includes('table'))" name="scroll" :title="$t('chart.scroll_cfg')">
<scroll-cfg
:param="param"
class="attr-selector"

View File

@ -140,8 +140,6 @@ export default {
created() {
this.attrs = this.controlAttrs
console.log(this.childViews)
console.log(this.attrs)
},
methods: {
multipleChange(value) {