forked from github/dataease
commit
958cbabb6f
@ -21,6 +21,8 @@ public class ChartViewWithBLOBs extends ChartView implements Serializable {
|
|||||||
|
|
||||||
private String customFilter;
|
private String customFilter;
|
||||||
|
|
||||||
|
private String drillFields;
|
||||||
|
|
||||||
private String snapshot;
|
private String snapshot;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
<result column="custom_attr" jdbcType="LONGVARCHAR" property="customAttr" />
|
<result column="custom_attr" jdbcType="LONGVARCHAR" property="customAttr" />
|
||||||
<result column="custom_style" jdbcType="LONGVARCHAR" property="customStyle" />
|
<result column="custom_style" jdbcType="LONGVARCHAR" property="customStyle" />
|
||||||
<result column="custom_filter" jdbcType="LONGVARCHAR" property="customFilter" />
|
<result column="custom_filter" jdbcType="LONGVARCHAR" property="customFilter" />
|
||||||
|
<result column="drill_fields" jdbcType="LONGVARCHAR" property="drillFields" />
|
||||||
<result column="snapshot" jdbcType="LONGVARCHAR" property="snapshot" />
|
<result column="snapshot" jdbcType="LONGVARCHAR" property="snapshot" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
@ -85,7 +86,8 @@
|
|||||||
style_priority
|
style_priority
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
x_axis, y_axis, ext_stack, custom_attr, custom_style, custom_filter, snapshot
|
x_axis, y_axis, ext_stack, custom_attr, custom_style, custom_filter, drill_fields,
|
||||||
|
snapshot
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExampleWithBLOBs" parameterType="io.dataease.base.domain.ChartViewExample" resultMap="ResultMapWithBLOBs">
|
<select id="selectByExampleWithBLOBs" parameterType="io.dataease.base.domain.ChartViewExample" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
@ -141,13 +143,15 @@
|
|||||||
create_by, create_time, update_time,
|
create_by, create_time, update_time,
|
||||||
style_priority, x_axis, y_axis,
|
style_priority, x_axis, y_axis,
|
||||||
ext_stack, custom_attr, custom_style,
|
ext_stack, custom_attr, custom_style,
|
||||||
custom_filter, snapshot)
|
custom_filter, drill_fields, snapshot
|
||||||
|
)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sceneId,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sceneId,jdbcType=VARCHAR},
|
||||||
#{tableId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
|
#{tableId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
|
||||||
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||||
#{stylePriority,jdbcType=VARCHAR}, #{xAxis,jdbcType=LONGVARCHAR}, #{yAxis,jdbcType=LONGVARCHAR},
|
#{stylePriority,jdbcType=VARCHAR}, #{xAxis,jdbcType=LONGVARCHAR}, #{yAxis,jdbcType=LONGVARCHAR},
|
||||||
#{extStack,jdbcType=LONGVARCHAR}, #{customAttr,jdbcType=LONGVARCHAR}, #{customStyle,jdbcType=LONGVARCHAR},
|
#{extStack,jdbcType=LONGVARCHAR}, #{customAttr,jdbcType=LONGVARCHAR}, #{customStyle,jdbcType=LONGVARCHAR},
|
||||||
#{customFilter,jdbcType=LONGVARCHAR}, #{snapshot,jdbcType=LONGVARCHAR})
|
#{customFilter,jdbcType=LONGVARCHAR}, #{drillFields,jdbcType=LONGVARCHAR}, #{snapshot,jdbcType=LONGVARCHAR}
|
||||||
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.dataease.base.domain.ChartViewWithBLOBs">
|
<insert id="insertSelective" parameterType="io.dataease.base.domain.ChartViewWithBLOBs">
|
||||||
insert into chart_view
|
insert into chart_view
|
||||||
@ -200,6 +204,9 @@
|
|||||||
<if test="customFilter != null">
|
<if test="customFilter != null">
|
||||||
custom_filter,
|
custom_filter,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="drillFields != null">
|
||||||
|
drill_fields,
|
||||||
|
</if>
|
||||||
<if test="snapshot != null">
|
<if test="snapshot != null">
|
||||||
snapshot,
|
snapshot,
|
||||||
</if>
|
</if>
|
||||||
@ -253,6 +260,9 @@
|
|||||||
<if test="customFilter != null">
|
<if test="customFilter != null">
|
||||||
#{customFilter,jdbcType=LONGVARCHAR},
|
#{customFilter,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="drillFields != null">
|
||||||
|
#{drillFields,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="snapshot != null">
|
<if test="snapshot != null">
|
||||||
#{snapshot,jdbcType=LONGVARCHAR},
|
#{snapshot,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@ -315,6 +325,9 @@
|
|||||||
<if test="record.customFilter != null">
|
<if test="record.customFilter != null">
|
||||||
custom_filter = #{record.customFilter,jdbcType=LONGVARCHAR},
|
custom_filter = #{record.customFilter,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.drillFields != null">
|
||||||
|
drill_fields = #{record.drillFields,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="record.snapshot != null">
|
<if test="record.snapshot != null">
|
||||||
snapshot = #{record.snapshot,jdbcType=LONGVARCHAR},
|
snapshot = #{record.snapshot,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@ -341,6 +354,7 @@
|
|||||||
custom_attr = #{record.customAttr,jdbcType=LONGVARCHAR},
|
custom_attr = #{record.customAttr,jdbcType=LONGVARCHAR},
|
||||||
custom_style = #{record.customStyle,jdbcType=LONGVARCHAR},
|
custom_style = #{record.customStyle,jdbcType=LONGVARCHAR},
|
||||||
custom_filter = #{record.customFilter,jdbcType=LONGVARCHAR},
|
custom_filter = #{record.customFilter,jdbcType=LONGVARCHAR},
|
||||||
|
drill_fields = #{record.drillFields,jdbcType=LONGVARCHAR},
|
||||||
snapshot = #{record.snapshot,jdbcType=LONGVARCHAR}
|
snapshot = #{record.snapshot,jdbcType=LONGVARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
@ -410,6 +424,9 @@
|
|||||||
<if test="customFilter != null">
|
<if test="customFilter != null">
|
||||||
custom_filter = #{customFilter,jdbcType=LONGVARCHAR},
|
custom_filter = #{customFilter,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="drillFields != null">
|
||||||
|
drill_fields = #{drillFields,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="snapshot != null">
|
<if test="snapshot != null">
|
||||||
snapshot = #{snapshot,jdbcType=LONGVARCHAR},
|
snapshot = #{snapshot,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@ -433,6 +450,7 @@
|
|||||||
custom_attr = #{customAttr,jdbcType=LONGVARCHAR},
|
custom_attr = #{customAttr,jdbcType=LONGVARCHAR},
|
||||||
custom_style = #{customStyle,jdbcType=LONGVARCHAR},
|
custom_style = #{customStyle,jdbcType=LONGVARCHAR},
|
||||||
custom_filter = #{customFilter,jdbcType=LONGVARCHAR},
|
custom_filter = #{customFilter,jdbcType=LONGVARCHAR},
|
||||||
|
drill_fields = #{drillFields,jdbcType=LONGVARCHAR},
|
||||||
snapshot = #{snapshot,jdbcType=LONGVARCHAR}
|
snapshot = #{snapshot,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
@ -3078,3 +3078,7 @@ COMMIT;
|
|||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE `chart_view` ADD COLUMN `drill_fields` LONGTEXT COMMENT '钻取字段' AFTER `custom_filter`;
|
||||||
|
UPDATE `chart_view` SET `drill_fields` = '[]';
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
<!--要生成的数据库表 -->
|
<!--要生成的数据库表 -->
|
||||||
|
|
||||||
<table tableName="dataset_table_function"/>
|
<table tableName="chart_view"/>
|
||||||
<!-- <table tableName="sys_dict"/>-->
|
<!-- <table tableName="sys_dict"/>-->
|
||||||
<!-- <table tableName="sys_dict_item"/>-->
|
<!-- <table tableName="sys_dict_item"/>-->
|
||||||
<!-- <table tableName="dataset_table_field"/>-->
|
<!-- <table tableName="dataset_table_field"/>-->
|
||||||
|
@ -746,6 +746,7 @@ export default {
|
|||||||
view.yaxis = JSON.stringify([])
|
view.yaxis = JSON.stringify([])
|
||||||
view.extStack = JSON.stringify([])
|
view.extStack = JSON.stringify([])
|
||||||
view.customFilter = JSON.stringify([])
|
view.customFilter = JSON.stringify([])
|
||||||
|
view.drillFields = JSON.stringify([])
|
||||||
post('/chart/view/save', view).then(response => {
|
post('/chart/view/save', view).then(response => {
|
||||||
this.closeCreateChart()
|
this.closeCreateChart()
|
||||||
this.$store.dispatch('chart/setTableId', null)
|
this.$store.dispatch('chart/setTableId', null)
|
||||||
|
@ -233,6 +233,29 @@
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row class="padding-lr">
|
||||||
|
<span style="width: 80px;text-align: right;">
|
||||||
|
<span>钻取</span>
|
||||||
|
/
|
||||||
|
<span>{{ $t('chart.dimension') }}</span>
|
||||||
|
</span>
|
||||||
|
<draggable
|
||||||
|
v-model="view.drillFields"
|
||||||
|
:disabled="!hasDataPermission('manage',param.privileges)"
|
||||||
|
group="drag"
|
||||||
|
animation="300"
|
||||||
|
:move="onMove"
|
||||||
|
class="drag-block-style"
|
||||||
|
@add="addXaxis"
|
||||||
|
>
|
||||||
|
<transition-group class="draggable-group">
|
||||||
|
<dimension-item v-for="(item,index) in view.drillFields" :key="item.id" :param="param" :index="index" :item="item" @onDimensionItemChange="dimensionItemChange" @onDimensionItemRemove="dimensionItemRemove" @editItemFilter="showDimensionEditFilter" @onNameEdit="showRename" />
|
||||||
|
</transition-group>
|
||||||
|
</draggable>
|
||||||
|
<div v-if="!view.drillFields || view.drillFields.length === 0" class="drag-placeholder-style">
|
||||||
|
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
<el-row v-if="view.type !=='text' && view.type !== 'gauge'" class="padding-lr">
|
<el-row v-if="view.type !=='text' && view.type !== 'gauge'" class="padding-lr">
|
||||||
<span style="width: 80px;text-align: right;">
|
<span style="width: 80px;text-align: right;">
|
||||||
<span v-if="view.type && view.type.includes('table')">{{ $t('chart.drag_block_table_data_column') }}</span>
|
<span v-if="view.type && view.type.includes('table')">{{ $t('chart.drag_block_table_data_column') }}</span>
|
||||||
@ -613,6 +636,7 @@ export default {
|
|||||||
xaxis: [],
|
xaxis: [],
|
||||||
yaxis: [],
|
yaxis: [],
|
||||||
extStack: [],
|
extStack: [],
|
||||||
|
drillFields: [],
|
||||||
show: true,
|
show: true,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
title: '',
|
title: '',
|
||||||
@ -800,6 +824,7 @@ export default {
|
|||||||
view.customStyle = JSON.stringify(view.customStyle)
|
view.customStyle = JSON.stringify(view.customStyle)
|
||||||
view.customFilter = JSON.stringify(view.customFilter)
|
view.customFilter = JSON.stringify(view.customFilter)
|
||||||
view.extStack = JSON.stringify(view.extStack)
|
view.extStack = JSON.stringify(view.extStack)
|
||||||
|
view.drillFields = JSON.stringify(view.drillFields)
|
||||||
post('/chart/view/save', view).then(response => {
|
post('/chart/view/save', view).then(response => {
|
||||||
// this.get(response.data.id);
|
// this.get(response.data.id);
|
||||||
// this.getData(response.data.id)
|
// this.getData(response.data.id)
|
||||||
@ -900,6 +925,7 @@ export default {
|
|||||||
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
||||||
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
|
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
|
||||||
this.view.extStack = this.view.extStack ? JSON.parse(this.view.extStack) : []
|
this.view.extStack = this.view.extStack ? JSON.parse(this.view.extStack) : []
|
||||||
|
this.view.drillFields = this.view.drillFields ? JSON.parse(this.view.drillFields) : []
|
||||||
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {}
|
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {}
|
||||||
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
||||||
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
||||||
@ -932,6 +958,7 @@ export default {
|
|||||||
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
||||||
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
|
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
|
||||||
this.view.extStack = this.view.extStack ? JSON.parse(this.view.extStack) : []
|
this.view.extStack = this.view.extStack ? JSON.parse(this.view.extStack) : []
|
||||||
|
this.view.drillFields = this.view.drillFields ? JSON.parse(this.view.drillFields) : []
|
||||||
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {}
|
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {}
|
||||||
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
||||||
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
||||||
|
Loading…
Reference in New Issue
Block a user