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

This commit is contained in:
taojinlong 2022-03-28 11:40:42 +08:00
commit 252f88bbba
8 changed files with 115 additions and 11 deletions

View File

@ -21,6 +21,8 @@ public class PanelLinkJumpInfo implements Serializable {
private Boolean checked;
private Boolean attachParams;
private String copyFrom;
private String copyId;

View File

@ -654,6 +654,66 @@ public class PanelLinkJumpInfoExample {
return (Criteria) this;
}
public Criteria andAttachParamsIsNull() {
addCriterion("attach_params is null");
return (Criteria) this;
}
public Criteria andAttachParamsIsNotNull() {
addCriterion("attach_params is not null");
return (Criteria) this;
}
public Criteria andAttachParamsEqualTo(Boolean value) {
addCriterion("attach_params =", value, "attachParams");
return (Criteria) this;
}
public Criteria andAttachParamsNotEqualTo(Boolean value) {
addCriterion("attach_params <>", value, "attachParams");
return (Criteria) this;
}
public Criteria andAttachParamsGreaterThan(Boolean value) {
addCriterion("attach_params >", value, "attachParams");
return (Criteria) this;
}
public Criteria andAttachParamsGreaterThanOrEqualTo(Boolean value) {
addCriterion("attach_params >=", value, "attachParams");
return (Criteria) this;
}
public Criteria andAttachParamsLessThan(Boolean value) {
addCriterion("attach_params <", value, "attachParams");
return (Criteria) this;
}
public Criteria andAttachParamsLessThanOrEqualTo(Boolean value) {
addCriterion("attach_params <=", value, "attachParams");
return (Criteria) this;
}
public Criteria andAttachParamsIn(List<Boolean> values) {
addCriterion("attach_params in", values, "attachParams");
return (Criteria) this;
}
public Criteria andAttachParamsNotIn(List<Boolean> values) {
addCriterion("attach_params not in", values, "attachParams");
return (Criteria) this;
}
public Criteria andAttachParamsBetween(Boolean value1, Boolean value2) {
addCriterion("attach_params between", value1, value2, "attachParams");
return (Criteria) this;
}
public Criteria andAttachParamsNotBetween(Boolean value1, Boolean value2) {
addCriterion("attach_params not between", value1, value2, "attachParams");
return (Criteria) this;
}
public Criteria andCopyFromIsNull() {
addCriterion("copy_from is null");
return (Criteria) this;

View File

@ -10,6 +10,7 @@
<result column="source_field_id" jdbcType="VARCHAR" property="sourceFieldId" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="checked" jdbcType="BIT" property="checked" />
<result column="attach_params" jdbcType="BIT" property="attachParams" />
<result column="copy_from" jdbcType="VARCHAR" property="copyFrom" />
<result column="copy_id" jdbcType="VARCHAR" property="copyId" />
</resultMap>
@ -73,7 +74,7 @@
</sql>
<sql id="Base_Column_List">
id, link_jump_id, link_type, jump_type, target_panel_id, source_field_id, content,
`checked`, copy_from, copy_id
`checked`, attach_params, copy_from, copy_id
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.PanelLinkJumpInfoExample" resultMap="BaseResultMap">
select
@ -108,12 +109,12 @@
<insert id="insert" parameterType="io.dataease.base.domain.PanelLinkJumpInfo">
insert into panel_link_jump_info (id, link_jump_id, link_type,
jump_type, target_panel_id, source_field_id,
content, `checked`, copy_from,
copy_id)
content, `checked`, attach_params,
copy_from, copy_id)
values (#{id,jdbcType=VARCHAR}, #{linkJumpId,jdbcType=VARCHAR}, #{linkType,jdbcType=VARCHAR},
#{jumpType,jdbcType=VARCHAR}, #{targetPanelId,jdbcType=VARCHAR}, #{sourceFieldId,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{checked,jdbcType=BIT}, #{copyFrom,jdbcType=VARCHAR},
#{copyId,jdbcType=VARCHAR})
#{content,jdbcType=VARCHAR}, #{checked,jdbcType=BIT}, #{attachParams,jdbcType=BIT},
#{copyFrom,jdbcType=VARCHAR}, #{copyId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.PanelLinkJumpInfo">
insert into panel_link_jump_info
@ -142,6 +143,9 @@
<if test="checked != null">
`checked`,
</if>
<if test="attachParams != null">
attach_params,
</if>
<if test="copyFrom != null">
copy_from,
</if>
@ -174,6 +178,9 @@
<if test="checked != null">
#{checked,jdbcType=BIT},
</if>
<if test="attachParams != null">
#{attachParams,jdbcType=BIT},
</if>
<if test="copyFrom != null">
#{copyFrom,jdbcType=VARCHAR},
</if>
@ -215,6 +222,9 @@
<if test="record.checked != null">
`checked` = #{record.checked,jdbcType=BIT},
</if>
<if test="record.attachParams != null">
attach_params = #{record.attachParams,jdbcType=BIT},
</if>
<if test="record.copyFrom != null">
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
</if>
@ -236,6 +246,7 @@
source_field_id = #{record.sourceFieldId,jdbcType=VARCHAR},
content = #{record.content,jdbcType=VARCHAR},
`checked` = #{record.checked,jdbcType=BIT},
attach_params = #{record.attachParams,jdbcType=BIT},
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
copy_id = #{record.copyId,jdbcType=VARCHAR}
<if test="_parameter != null">
@ -266,6 +277,9 @@
<if test="checked != null">
`checked` = #{checked,jdbcType=BIT},
</if>
<if test="attachParams != null">
attach_params = #{attachParams,jdbcType=BIT},
</if>
<if test="copyFrom != null">
copy_from = #{copyFrom,jdbcType=VARCHAR},
</if>
@ -284,6 +298,7 @@
source_field_id = #{sourceFieldId,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
`checked` = #{checked,jdbcType=BIT},
attach_params = #{attachParams,jdbcType=BIT},
copy_from = #{copyFrom,jdbcType=VARCHAR},
copy_id = #{copyId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}

View File

@ -38,6 +38,7 @@
panel_link_jump_info.content,
ifnull( panel_link_mapping.uuid, panel_link_mapping.id ) AS publicJumpId,
ifnull( panel_link_jump_info.checked, 0 ) AS checked,
ifnull( panel_link_jump_info.attach_params, 0 ) AS attach_params,
panel_link_jump_target_view_info.target_view_id,
panel_link_jump_target_view_info.target_field_id
FROM
@ -198,6 +199,7 @@
source_field_id,
content,
`checked`,
`attach_params`,
copy_from,
copy_id
) SELECT
@ -209,6 +211,7 @@
source_field_id,
content,
`checked`,
`attach_params`,
id AS copy_from,
#{copyId}
FROM

View File

@ -247,4 +247,7 @@ END
;;
delimiter ;
INSERT INTO `my_plugin`(`plugin_id`, `name`, `store`, `free`, `cost`, `category`, `descript`, `version`, `install_type`, `creator`, `load_mybatis`, `release_time`, `install_time`, `module_name`, `icon`) VALUES (3, 'tabs插件', 'default', 0, 20000, 'panel', 'tabs插件', '1.0-SNAPSHOT', NULL, 'fit2cloud-chenyw', 0, NULL, NULL, 'dataease-extensions-tabs-backend', NULL);
INSERT INTO `my_plugin`(`plugin_id`, `name`, `store`, `free`, `cost`, `category`, `descript`, `version`, `install_type`, `creator`, `load_mybatis`, `release_time`, `install_time`, `module_name`, `icon`) VALUES (3, 'tabs插件', 'default', 0, 20000, 'panel', 'tabs插件', '1.0-SNAPSHOT', NULL, 'fit2cloud-chenyw', 0, NULL, NULL, 'dataease-extensions-tabs-backend', NULL);
ALTER TABLE `panel_link_jump_info`
ADD COLUMN `attach_params` tinyint(1) NULL COMMENT '是否附加点击参数' AFTER `checked`;

View File

@ -63,8 +63,9 @@
<!-- <table tableName="de_engine">-->
<!-- <columnOverride column="configuration" property="configuration" javaType="java.lang.String"/>-->
<!-- </table>-->
<table tableName="panel_outer_params"/>
<table tableName="panel_outer_params_info"/>
<table tableName="panel_outer_params_target_view_info"/>
<table tableName="panel_link_jump"/>
<table tableName="panel_link_jump_info"/>
<!-- <table tableName="panel_outer_params_info"/>-->
<!-- <table tableName="panel_outer_params_target_view_info"/>-->
</context>
</generatorConfiguration>

View File

@ -524,7 +524,7 @@ export default {
},
jumpClick(param) {
let dimension, jumpInfo, sourceInfo
let dimension, jumpInfo, sourceInfo, jumpFieldName
//
for (let i = param.dimensionList.length - 1; i >= 0; i--) {
dimension = param.dimensionList[i]
@ -566,7 +566,21 @@ export default {
})
}
} else {
const url = jumpInfo.content
let url = jumpInfo.content
//
if (jumpInfo.attachParams && this.chart.data && this.chart.data.sourceFields) {
this.chart.data.sourceFields.forEach(item => {
if (item.id === dimension.id) {
jumpFieldName = item.name
}
})
const urlAttachParams = jumpFieldName + '=' + dimension.value
if (url.indexOf('?') > -1) {
url = url + '&' + urlAttachParams
} else {
url = url + '?' + urlAttachParams
}
}
window.open(url, jumpInfo.jumpType)
}
} else {

View File

@ -71,6 +71,9 @@
<el-radio label="_blank">{{ $t('panel.new_window') }}</el-radio>
</el-radio-group>
</el-col>
<el-col v-if="linkJumpInfo.linkType==='outer'" :span="9">
<el-checkbox v-model="linkJumpInfo.attachParams">附加点击参数</el-checkbox>
</el-col>
</el-row>
<el-row v-if="linkJumpInfo.linkType==='inner'" style="margin-top: 5px;" class="top_border">
<el-row style="margin-top: 10px">
@ -292,6 +295,9 @@ export default {
if (!this.linkJumpInfo.content) {
this.linkJumpInfo.content = 'http://'
}
if (!this.linkJumpInfo.attachParams) {
this.linkJumpInfo.attachParams = false
}
if (this.linkJumpInfo.targetPanelId) {
this.getPanelViewList(this.linkJumpInfo.targetPanelId)
}