forked from github/dataease
feat(fix):视图字段变化优化;过滤组件优化;返回数据优化
This commit is contained in:
parent
314a100fc5
commit
f261acb72f
@ -180,6 +180,9 @@ public class ChartViewService {
|
||||
}
|
||||
data = datasourceProvider.getData(datasourceRequest);
|
||||
}
|
||||
if (StringUtils.containsIgnoreCase(view.getType(), "pie") && data.size() > 1000) {
|
||||
data = data.subList(0, 1000);
|
||||
}
|
||||
|
||||
// 图表组件可再扩展
|
||||
List<String> x = new ArrayList<>();
|
||||
|
@ -23,7 +23,7 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="f.value" class="value-item" :placeholder="$t('chart.no_limit')" size="mini" clearable />
|
||||
<el-input v-show="!f.term.includes('null')" v-model="f.value" class="value-item" :placeholder="$t('chart.no_limit')" size="mini" clearable />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="text" icon="el-icon-delete" circle style="float: right" @click="removeFilter(index)" />
|
||||
|
@ -23,7 +23,7 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="f.value" class="value-item" :placeholder="$t('chart.no_limit')" size="mini" clearable />
|
||||
<el-input v-show="!f.term.includes('null')" v-model="f.value" class="value-item" :placeholder="$t('chart.no_limit')" size="mini" clearable />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="text" icon="el-icon-delete" circle style="float: right" @click="removeFilter(index)" />
|
||||
|
@ -37,7 +37,7 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="f.value" class="value-item" :placeholder="$t('chart.no_limit')" size="mini" clearable />
|
||||
<el-input v-show="!f.term.includes('null')" v-model="f.value" class="value-item" :placeholder="$t('chart.no_limit')" size="mini" clearable />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="text" icon="el-icon-delete" circle style="float: right" @click="removeFilter(index)" />
|
||||
|
@ -334,7 +334,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { post, ajaxGetData } from '@/api/chart/chart'
|
||||
import { ajaxGetData, post } from '@/api/chart/chart'
|
||||
import draggable from 'vuedraggable'
|
||||
import DimensionItem from '../components/drag-item/DimensionItem'
|
||||
import QuotaItem from '../components/drag-item/QuotaItem'
|
||||
@ -342,18 +342,17 @@ import ResultFilterEditor from '../components/filter/ResultFilterEditor'
|
||||
import ChartComponent from '../components/ChartComponent'
|
||||
import bus from '@/utils/bus'
|
||||
import DatasetChartDetail from '../../dataset/common/DatasetChartDetail'
|
||||
|
||||
// shape attr,component style
|
||||
import {
|
||||
DEFAULT_BACKGROUND_COLOR,
|
||||
DEFAULT_COLOR_CASE,
|
||||
DEFAULT_LABEL,
|
||||
DEFAULT_LEGEND_STYLE,
|
||||
DEFAULT_SIZE,
|
||||
DEFAULT_TITLE_STYLE,
|
||||
DEFAULT_LEGEND_STYLE,
|
||||
DEFAULT_LABEL,
|
||||
DEFAULT_TOOLTIP,
|
||||
DEFAULT_XAXIS_STYLE,
|
||||
DEFAULT_YAXIS_STYLE,
|
||||
DEFAULT_BACKGROUND_COLOR
|
||||
DEFAULT_YAXIS_STYLE
|
||||
} from '../chart/chart'
|
||||
import ColorSelector from '../components/shape-attr/ColorSelector'
|
||||
import SizeSelector from '../components/shape-attr/SizeSelector'
|
||||
@ -646,6 +645,9 @@ export default {
|
||||
this.resetView()
|
||||
this.httpRequest.status = err.response.data.success
|
||||
this.httpRequest.msg = err.response.data.message
|
||||
this.$nextTick(() => {
|
||||
this.getChart(id)
|
||||
})
|
||||
return true
|
||||
})
|
||||
} else {
|
||||
@ -666,9 +668,9 @@ export default {
|
||||
response.data.data = this.data
|
||||
this.chart = response.data
|
||||
|
||||
this.httpRequest.status = true
|
||||
// this.httpRequest.status = true
|
||||
}).catch(err => {
|
||||
this.resetView()
|
||||
// this.resetView()
|
||||
this.httpRequest.status = err.response.data.success
|
||||
this.httpRequest.msg = err.response.data.message
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user