forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
d01a067c32
@ -33,6 +33,7 @@
|
||||
chart_view.create_time,
|
||||
chart_view.update_time,
|
||||
chart_view.style_priority,
|
||||
ifnull(chart_view.is_plugin,0) as 'is_plugin',
|
||||
panel_view.panel_id,
|
||||
dataset_table_field.id as 'field_id',
|
||||
dataset_table_field.origin_name,
|
||||
|
@ -787,7 +787,7 @@ public class ChartViewService {
|
||||
data = datasourceProvider.getData(datasourceRequest);
|
||||
|
||||
Map<String, Object> mapChart = pluginViewResult(pluginViewParam, view, data, isDrill);
|
||||
Map<String, Object> mapTableNormal = ChartDataBuild.transTableNormal(xAxis, yAxis, view, data, extStack, desensitizationList);
|
||||
Map<String, Object> mapTableNormal = ChartDataBuild.transTableNormal(fieldMap, view, data, desensitizationList);
|
||||
|
||||
return uniteViewResult(datasourceRequest.getQuery(), mapChart, mapTableNormal, view, isDrill, drillFilters);
|
||||
// 如果是插件到此结束
|
||||
|
@ -859,9 +859,7 @@ public class ChartDataBuild {
|
||||
|
||||
// 表格
|
||||
public static Map<String, Object> transTableNormal(List<ChartViewFieldDTO> xAxis, List<ChartViewFieldDTO> yAxis, ChartViewWithBLOBs view, List<String[]> data, List<ChartViewFieldDTO> extStack, List<String> desensitizationList) {
|
||||
Map<String, Object> map = new TreeMap<>();
|
||||
List<ChartViewFieldDTO> fields = new ArrayList<>();
|
||||
List<Map<String, Object>> tableRow = new ArrayList<>();
|
||||
if (ObjectUtils.isNotEmpty(xAxis)) {
|
||||
fields.addAll(xAxis);
|
||||
}
|
||||
@ -871,6 +869,18 @@ public class ChartDataBuild {
|
||||
}
|
||||
}
|
||||
fields.addAll(yAxis);
|
||||
return transTableNormal(fields, view, data, desensitizationList);
|
||||
}
|
||||
|
||||
// 表格
|
||||
public static Map<String, Object> transTableNormal(Map<String, List<ChartViewFieldDTO>> fieldMap, ChartViewWithBLOBs view, List<String[]> data, List<String> desensitizationList) {
|
||||
List<ChartViewFieldDTO> fields = fieldMap.entrySet().stream().map(Map.Entry::getValue).flatMap(List::stream).collect(Collectors.toList());
|
||||
return transTableNormal(fields, view, data, desensitizationList);
|
||||
}
|
||||
|
||||
private static Map<String, Object> transTableNormal(List<ChartViewFieldDTO> fields, ChartViewWithBLOBs view, List<String[]> data, List<String> desensitizationList) {
|
||||
Map<String, Object> map = new TreeMap<>();
|
||||
List<Map<String, Object>> tableRow = new ArrayList<>();
|
||||
data.forEach(ele -> {
|
||||
Map<String, Object> d = new HashMap<>();
|
||||
for (int i = 0; i < fields.size(); i++) {
|
||||
@ -880,7 +890,7 @@ public class ChartDataBuild {
|
||||
}
|
||||
|
||||
ChartViewFieldDTO chartViewFieldDTO = fields.get(i);
|
||||
if (chartViewFieldDTO.getDeType() == 0 || chartViewFieldDTO.getDeType() == 1) {
|
||||
if (chartViewFieldDTO.getDeType() == 0 || chartViewFieldDTO.getDeType() == 1 || chartViewFieldDTO.getDeType() == 5) {
|
||||
d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]);
|
||||
} else if (chartViewFieldDTO.getDeType() == 2 || chartViewFieldDTO.getDeType() == 3) {
|
||||
d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? null : new BigDecimal(ele[i]).setScale(2, RoundingMode.HALF_UP));
|
||||
|
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div class="bar-main">
|
||||
<input id="input" ref="files" type="file" accept="image/*" hidden @click="e => {e.target.value = '';}" @change="handleFileChange">
|
||||
<div v-if="linkageAreaShow" style="margin-right: -1px;width: 18px">
|
||||
<el-checkbox v-model="linkageInfo.linkageActive" />
|
||||
<div v-if="linkageAreaShow" style="margin-right: -1px;width: 20px">
|
||||
<el-checkbox v-model="linkageInfo.linkageActive" size="medium" />
|
||||
<linkage-field v-if="linkageInfo.linkageActive" :element="element" />
|
||||
</div>
|
||||
<div v-if="batchOptAreaShow" style="margin-right: -1px;width: 18px;z-index: 5">
|
||||
<el-checkbox @change="batchOptChange" />
|
||||
<div v-if="batchOptAreaShow" style="margin-right: -1px;width: 20px;z-index: 5">
|
||||
<el-checkbox size="medium" @change="batchOptChange" />
|
||||
</div>
|
||||
<div v-if="normalAreaShow">
|
||||
<setting-menu v-if="activeModel==='edit'" style="float: right;height: 24px!important;" @amRemoveItem="amRemoveItem" @linkJumpSet="linkJumpSet" @boardSet="boardSet">
|
||||
@ -297,4 +297,13 @@ export default {
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.bar-main ::v-deep .el-checkbox__inner{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.bar-main ::v-deep .el-checkbox__inner::after{
|
||||
width: 4.5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="bar-main">
|
||||
<div style="width: 18px">
|
||||
<div style="width: 20px">
|
||||
<!-- <svg-icon icon-class="field_text" class="el-icon-close" />-->
|
||||
<el-checkbox v-model="element.mobileSelected" @change="onChange" />
|
||||
</div>
|
||||
@ -84,4 +84,12 @@ export default {
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.bar-main ::v-deep .el-checkbox__inner{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.bar-main ::v-deep .el-checkbox__inner::after{
|
||||
width: 4.5px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1564,7 +1564,9 @@ export const TYPE_CONFIGS = [
|
||||
'position',
|
||||
'name',
|
||||
'nameTextStyle',
|
||||
'splitLine'
|
||||
'axisValue',
|
||||
'splitLine',
|
||||
'axisLabel'
|
||||
],
|
||||
'title-selector': [
|
||||
'show',
|
||||
|
@ -95,10 +95,13 @@
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
<span style="float: left">
|
||||
<span v-if="item.isPlugin" style="float: left">
|
||||
<svg-icon :icon-class="item.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + item.type + '/svg') : item.type" style="width: 14px;height: 14px" />
|
||||
</span>
|
||||
<span v-else style="float: left">
|
||||
<svg-icon :icon-class="item.type" style="width: 14px;height: 14px" />
|
||||
</span>
|
||||
<span style="float: left; font-size: 12px"> {{ item.name }}</span>
|
||||
<span style="float: left; font-size: 12px">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
@ -81,7 +81,10 @@
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
<span style="float: left">
|
||||
<span v-if="item.isPlugin" style="float: left">
|
||||
<svg-icon :icon-class="item.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + item.type + '/svg') : item.type" style="width: 14px;height: 14px" />
|
||||
</span>
|
||||
<span v-else style="float: left">
|
||||
<svg-icon :icon-class="item.type" style="width: 14px;height: 14px" />
|
||||
</span>
|
||||
<span style="float: left; font-size: 12px"> {{ item.name }}</span>
|
||||
|
Loading…
Reference in New Issue
Block a user