feat:仪表板联动设置浮层
This commit is contained in:
parent
4f81ca0f40
commit
d46a40dcd2
@ -2,11 +2,15 @@ package io.dataease.base.domain;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
|
@AllArgsConstructor //全参构造函数
|
||||||
|
@NoArgsConstructor //无参构造函数
|
||||||
public class DatasetTableField implements Serializable {
|
public class DatasetTableField implements Serializable {
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|||||||
@ -9,9 +9,9 @@ public class PanelViewLinkageField implements Serializable {
|
|||||||
|
|
||||||
private String linkageId;
|
private String linkageId;
|
||||||
|
|
||||||
private String sourceFiled;
|
private String sourceField;
|
||||||
|
|
||||||
private String targetFiled;
|
private String targetField;
|
||||||
|
|
||||||
private Long updateTime;
|
private Long updateTime;
|
||||||
|
|
||||||
|
|||||||
@ -244,143 +244,143 @@ public class PanelViewLinkageFieldExample {
|
|||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledIsNull() {
|
public Criteria andSourceFieldIsNull() {
|
||||||
addCriterion("source_filed is null");
|
addCriterion("source_field is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledIsNotNull() {
|
public Criteria andSourceFieldIsNotNull() {
|
||||||
addCriterion("source_filed is not null");
|
addCriterion("source_field is not null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledEqualTo(String value) {
|
public Criteria andSourceFieldEqualTo(String value) {
|
||||||
addCriterion("source_filed =", value, "sourceFiled");
|
addCriterion("source_field =", value, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledNotEqualTo(String value) {
|
public Criteria andSourceFieldNotEqualTo(String value) {
|
||||||
addCriterion("source_filed <>", value, "sourceFiled");
|
addCriterion("source_field <>", value, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledGreaterThan(String value) {
|
public Criteria andSourceFieldGreaterThan(String value) {
|
||||||
addCriterion("source_filed >", value, "sourceFiled");
|
addCriterion("source_field >", value, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledGreaterThanOrEqualTo(String value) {
|
public Criteria andSourceFieldGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("source_filed >=", value, "sourceFiled");
|
addCriterion("source_field >=", value, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledLessThan(String value) {
|
public Criteria andSourceFieldLessThan(String value) {
|
||||||
addCriterion("source_filed <", value, "sourceFiled");
|
addCriterion("source_field <", value, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledLessThanOrEqualTo(String value) {
|
public Criteria andSourceFieldLessThanOrEqualTo(String value) {
|
||||||
addCriterion("source_filed <=", value, "sourceFiled");
|
addCriterion("source_field <=", value, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledLike(String value) {
|
public Criteria andSourceFieldLike(String value) {
|
||||||
addCriterion("source_filed like", value, "sourceFiled");
|
addCriterion("source_field like", value, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledNotLike(String value) {
|
public Criteria andSourceFieldNotLike(String value) {
|
||||||
addCriterion("source_filed not like", value, "sourceFiled");
|
addCriterion("source_field not like", value, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledIn(List<String> values) {
|
public Criteria andSourceFieldIn(List<String> values) {
|
||||||
addCriterion("source_filed in", values, "sourceFiled");
|
addCriterion("source_field in", values, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledNotIn(List<String> values) {
|
public Criteria andSourceFieldNotIn(List<String> values) {
|
||||||
addCriterion("source_filed not in", values, "sourceFiled");
|
addCriterion("source_field not in", values, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledBetween(String value1, String value2) {
|
public Criteria andSourceFieldBetween(String value1, String value2) {
|
||||||
addCriterion("source_filed between", value1, value2, "sourceFiled");
|
addCriterion("source_field between", value1, value2, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andSourceFiledNotBetween(String value1, String value2) {
|
public Criteria andSourceFieldNotBetween(String value1, String value2) {
|
||||||
addCriterion("source_filed not between", value1, value2, "sourceFiled");
|
addCriterion("source_field not between", value1, value2, "sourceField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledIsNull() {
|
public Criteria andTargetFieldIsNull() {
|
||||||
addCriterion("target_filed is null");
|
addCriterion("target_field is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledIsNotNull() {
|
public Criteria andTargetFieldIsNotNull() {
|
||||||
addCriterion("target_filed is not null");
|
addCriterion("target_field is not null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledEqualTo(String value) {
|
public Criteria andTargetFieldEqualTo(String value) {
|
||||||
addCriterion("target_filed =", value, "targetFiled");
|
addCriterion("target_field =", value, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledNotEqualTo(String value) {
|
public Criteria andTargetFieldNotEqualTo(String value) {
|
||||||
addCriterion("target_filed <>", value, "targetFiled");
|
addCriterion("target_field <>", value, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledGreaterThan(String value) {
|
public Criteria andTargetFieldGreaterThan(String value) {
|
||||||
addCriterion("target_filed >", value, "targetFiled");
|
addCriterion("target_field >", value, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledGreaterThanOrEqualTo(String value) {
|
public Criteria andTargetFieldGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("target_filed >=", value, "targetFiled");
|
addCriterion("target_field >=", value, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledLessThan(String value) {
|
public Criteria andTargetFieldLessThan(String value) {
|
||||||
addCriterion("target_filed <", value, "targetFiled");
|
addCriterion("target_field <", value, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledLessThanOrEqualTo(String value) {
|
public Criteria andTargetFieldLessThanOrEqualTo(String value) {
|
||||||
addCriterion("target_filed <=", value, "targetFiled");
|
addCriterion("target_field <=", value, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledLike(String value) {
|
public Criteria andTargetFieldLike(String value) {
|
||||||
addCriterion("target_filed like", value, "targetFiled");
|
addCriterion("target_field like", value, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledNotLike(String value) {
|
public Criteria andTargetFieldNotLike(String value) {
|
||||||
addCriterion("target_filed not like", value, "targetFiled");
|
addCriterion("target_field not like", value, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledIn(List<String> values) {
|
public Criteria andTargetFieldIn(List<String> values) {
|
||||||
addCriterion("target_filed in", values, "targetFiled");
|
addCriterion("target_field in", values, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledNotIn(List<String> values) {
|
public Criteria andTargetFieldNotIn(List<String> values) {
|
||||||
addCriterion("target_filed not in", values, "targetFiled");
|
addCriterion("target_field not in", values, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledBetween(String value1, String value2) {
|
public Criteria andTargetFieldBetween(String value1, String value2) {
|
||||||
addCriterion("target_filed between", value1, value2, "targetFiled");
|
addCriterion("target_field between", value1, value2, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTargetFiledNotBetween(String value1, String value2) {
|
public Criteria andTargetFieldNotBetween(String value1, String value2) {
|
||||||
addCriterion("target_filed not between", value1, value2, "targetFiled");
|
addCriterion("target_field not between", value1, value2, "targetField");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
<resultMap id="BaseResultMap" type="io.dataease.base.domain.PanelViewLinkageField">
|
<resultMap id="BaseResultMap" type="io.dataease.base.domain.PanelViewLinkageField">
|
||||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="linkage_id" jdbcType="VARCHAR" property="linkageId" />
|
<result column="linkage_id" jdbcType="VARCHAR" property="linkageId" />
|
||||||
<result column="source_filed" jdbcType="VARCHAR" property="sourceFiled" />
|
<result column="source_field" jdbcType="VARCHAR" property="sourceField" />
|
||||||
<result column="target_filed" jdbcType="VARCHAR" property="targetFiled" />
|
<result column="target_field" jdbcType="VARCHAR" property="targetField" />
|
||||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
@ -67,7 +67,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, linkage_id, source_filed, target_filed, update_time
|
id, linkage_id, source_field, target_field, update_time
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="io.dataease.base.domain.PanelViewLinkageFieldExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="io.dataease.base.domain.PanelViewLinkageFieldExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@ -100,10 +100,10 @@
|
|||||||
</if>
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.dataease.base.domain.PanelViewLinkageField">
|
<insert id="insert" parameterType="io.dataease.base.domain.PanelViewLinkageField">
|
||||||
insert into panel_view_linkage_field (id, linkage_id, source_filed,
|
insert into panel_view_linkage_field (id, linkage_id, source_field,
|
||||||
target_filed, update_time)
|
target_field, update_time)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{linkageId,jdbcType=VARCHAR}, #{sourceFiled,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{linkageId,jdbcType=VARCHAR}, #{sourceField,jdbcType=VARCHAR},
|
||||||
#{targetFiled,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT})
|
#{targetField,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.dataease.base.domain.PanelViewLinkageField">
|
<insert id="insertSelective" parameterType="io.dataease.base.domain.PanelViewLinkageField">
|
||||||
insert into panel_view_linkage_field
|
insert into panel_view_linkage_field
|
||||||
@ -114,11 +114,11 @@
|
|||||||
<if test="linkageId != null">
|
<if test="linkageId != null">
|
||||||
linkage_id,
|
linkage_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="sourceFiled != null">
|
<if test="sourceField != null">
|
||||||
source_filed,
|
source_field,
|
||||||
</if>
|
</if>
|
||||||
<if test="targetFiled != null">
|
<if test="targetField != null">
|
||||||
target_filed,
|
target_field,
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
update_time,
|
update_time,
|
||||||
@ -131,11 +131,11 @@
|
|||||||
<if test="linkageId != null">
|
<if test="linkageId != null">
|
||||||
#{linkageId,jdbcType=VARCHAR},
|
#{linkageId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="sourceFiled != null">
|
<if test="sourceField != null">
|
||||||
#{sourceFiled,jdbcType=VARCHAR},
|
#{sourceField,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="targetFiled != null">
|
<if test="targetField != null">
|
||||||
#{targetFiled,jdbcType=VARCHAR},
|
#{targetField,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
#{updateTime,jdbcType=BIGINT},
|
#{updateTime,jdbcType=BIGINT},
|
||||||
@ -157,11 +157,11 @@
|
|||||||
<if test="record.linkageId != null">
|
<if test="record.linkageId != null">
|
||||||
linkage_id = #{record.linkageId,jdbcType=VARCHAR},
|
linkage_id = #{record.linkageId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.sourceFiled != null">
|
<if test="record.sourceField != null">
|
||||||
source_filed = #{record.sourceFiled,jdbcType=VARCHAR},
|
source_field = #{record.sourceField,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.targetFiled != null">
|
<if test="record.targetField != null">
|
||||||
target_filed = #{record.targetFiled,jdbcType=VARCHAR},
|
target_field = #{record.targetField,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.updateTime != null">
|
<if test="record.updateTime != null">
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
@ -175,8 +175,8 @@
|
|||||||
update panel_view_linkage_field
|
update panel_view_linkage_field
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
linkage_id = #{record.linkageId,jdbcType=VARCHAR},
|
linkage_id = #{record.linkageId,jdbcType=VARCHAR},
|
||||||
source_filed = #{record.sourceFiled,jdbcType=VARCHAR},
|
source_field = #{record.sourceField,jdbcType=VARCHAR},
|
||||||
target_filed = #{record.targetFiled,jdbcType=VARCHAR},
|
target_field = #{record.targetField,jdbcType=VARCHAR},
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
@ -188,11 +188,11 @@
|
|||||||
<if test="linkageId != null">
|
<if test="linkageId != null">
|
||||||
linkage_id = #{linkageId,jdbcType=VARCHAR},
|
linkage_id = #{linkageId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="sourceFiled != null">
|
<if test="sourceField != null">
|
||||||
source_filed = #{sourceFiled,jdbcType=VARCHAR},
|
source_field = #{sourceField,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="targetFiled != null">
|
<if test="targetField != null">
|
||||||
target_filed = #{targetFiled,jdbcType=VARCHAR},
|
target_field = #{targetField,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
@ -203,8 +203,8 @@
|
|||||||
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.PanelViewLinkageField">
|
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.PanelViewLinkageField">
|
||||||
update panel_view_linkage_field
|
update panel_view_linkage_field
|
||||||
set linkage_id = #{linkageId,jdbcType=VARCHAR},
|
set linkage_id = #{linkageId,jdbcType=VARCHAR},
|
||||||
source_filed = #{sourceFiled,jdbcType=VARCHAR},
|
source_field = #{sourceField,jdbcType=VARCHAR},
|
||||||
target_filed = #{targetFiled,jdbcType=VARCHAR},
|
target_field = #{targetField,jdbcType=VARCHAR},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT}
|
update_time = #{updateTime,jdbcType=BIGINT}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@ -9,6 +9,11 @@ import java.util.List;
|
|||||||
public interface ExtPanelViewLinkageMapper {
|
public interface ExtPanelViewLinkageMapper {
|
||||||
|
|
||||||
List<PanelViewLinkageDTO> getViewLinkageGather(@Param("panelId") String panelId,@Param("sourceViewId") String sourceViewId,@Param("targetViewIds") List<String> targetViewIds);
|
List<PanelViewLinkageDTO> getViewLinkageGather(@Param("panelId") String panelId,@Param("sourceViewId") String sourceViewId,@Param("targetViewIds") List<String> targetViewIds);
|
||||||
List<DatasetTableField> queryTableField(@Param("tableId") String tableId);
|
|
||||||
|
List<DatasetTableField> queryTableField(@Param("table_id") String tableId);
|
||||||
|
|
||||||
|
void deleteViewLinkage(@Param("panelId") String panelId,@Param("sourceViewId") String sourceViewId);
|
||||||
|
|
||||||
|
void deleteViewLinkageField(@Param("panelId") String panelId,@Param("sourceViewId") String sourceViewId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<mapper namespace="io.dataease.base.mapper.ext.ExtPanelViewLinkageMapper">
|
<mapper namespace="io.dataease.base.mapper.ext.ExtPanelViewLinkageMapper">
|
||||||
|
|
||||||
<resultMap id="TableFieldMap" type="io.dataease.base.domain.DatasetTableField">
|
<resultMap id="TableFieldMap" type="io.dataease.base.domain.DatasetTableField">
|
||||||
<id column="id" jdbcType="VARCHAR" property="id"/>
|
<result column="id" jdbcType="VARCHAR" property="id"/>
|
||||||
<result column="table_id" jdbcType="VARCHAR" property="tableId"/>
|
<result column="table_id" jdbcType="VARCHAR" property="tableId"/>
|
||||||
<result column="origin_name" jdbcType="VARCHAR" property="originName"/>
|
<result column="origin_name" jdbcType="VARCHAR" property="originName"/>
|
||||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||||
@ -15,12 +15,12 @@
|
|||||||
<result column="table_id" jdbcType="VARCHAR" property="tableId"/>
|
<result column="table_id" jdbcType="VARCHAR" property="tableId"/>
|
||||||
<result column="targetViewName" jdbcType="VARCHAR" property="targetViewName"/>
|
<result column="targetViewName" jdbcType="VARCHAR" property="targetViewName"/>
|
||||||
<result column="linkageActive" property="linkageActive"/>
|
<result column="linkageActive" property="linkageActive"/>
|
||||||
<!-- <collection property="targetViewFields" ofType="io.dataease.base.domain.DatasetTableField" column="table_id"-->
|
<collection property="targetViewFields" ofType="io.dataease.base.domain.DatasetTableField" column="table_id"
|
||||||
<!-- select="queryTableField">-->
|
select="queryTableField">
|
||||||
<!-- </collection>-->
|
</collection>
|
||||||
<collection property="linkageFields" ofType="io.dataease.dto.PanelViewLinkageFieldDTO">
|
<collection property="linkageFields" ofType="io.dataease.base.domain.PanelViewLinkageField">
|
||||||
<result column="source_filed" jdbcType="VARCHAR" property="sourceFiled"/>
|
<result column="source_field" jdbcType="VARCHAR" property="sourceField"/>
|
||||||
<result column="target_filed" jdbcType="VARCHAR" property="targetFiled"/>
|
<result column="target_field" jdbcType="VARCHAR" property="targetField"/>
|
||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -30,14 +30,14 @@
|
|||||||
chart_view.id as 'target_view_id',
|
chart_view.id as 'target_view_id',
|
||||||
chart_view.table_id,
|
chart_view.table_id,
|
||||||
(case when panel_view_linkage.target_view_id is null then 0 else 1 end) as 'linkageActive',
|
(case when panel_view_linkage.target_view_id is null then 0 else 1 end) as 'linkageActive',
|
||||||
panel_view_linkage_field.source_filed,
|
panel_view_linkage_field.source_field,
|
||||||
panel_view_linkage_field.target_filed
|
panel_view_linkage_field.target_field
|
||||||
FROM
|
FROM
|
||||||
chart_view
|
chart_view
|
||||||
LEFT JOIN panel_view_linkage ON chart_view.id = panel_view_linkage.target_view_id
|
LEFT JOIN panel_view_linkage ON chart_view.id = panel_view_linkage.target_view_id
|
||||||
LEFT JOIN panel_view_linkage_field ON panel_view_linkage.id = panel_view_linkage_field.linkage_id
|
|
||||||
AND panel_view_linkage.panel_id = #{panelId}
|
AND panel_view_linkage.panel_id = #{panelId}
|
||||||
AND panel_view_linkage.source_view_id = #{sourceViewId}
|
AND panel_view_linkage.source_view_id = #{sourceViewId}
|
||||||
|
LEFT JOIN panel_view_linkage_field ON panel_view_linkage.id = panel_view_linkage_field.linkage_id
|
||||||
where chart_view.id in
|
where chart_view.id in
|
||||||
<foreach collection="targetViewIds" item="targetViewId" index="index" open="(" close=")" separator=",">
|
<foreach collection="targetViewIds" item="targetViewId" index="index" open="(" close=")" separator=",">
|
||||||
#{targetViewId}
|
#{targetViewId}
|
||||||
@ -49,9 +49,33 @@
|
|||||||
dataset_table_field.id,
|
dataset_table_field.id,
|
||||||
dataset_table_field.table_id,
|
dataset_table_field.table_id,
|
||||||
dataset_table_field.origin_name,
|
dataset_table_field.origin_name,
|
||||||
dataset_table_field.name,
|
dataset_table_field.`name`,
|
||||||
dataset_table_field.de_type
|
dataset_table_field.de_type
|
||||||
from dataset_table_field where table_id = #{tableId}
|
from dataset_table_field where table_id = #{table_id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<delete id="deleteViewLinkage">
|
||||||
|
delete from panel_view_linkage where panel_view_linkage.panel_id = #{panelId}
|
||||||
|
AND panel_view_linkage.source_view_id = #{sourceViewId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
|
<delete id="deleteViewLinkageField">
|
||||||
|
DELETE pvl
|
||||||
|
FROM
|
||||||
|
panel_view_linkage pvl,
|
||||||
|
panel_view_linkage_field pvlf
|
||||||
|
WHERE
|
||||||
|
pvl.id = pvlf.linkage_id
|
||||||
|
AND pvl.source_view_id = #{panelId}
|
||||||
|
AND pvl.panel_id = #{panelId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<insert id="savePluginMenu">
|
||||||
|
INSERT INTO `panel_view_linkage` ( menu_id, title, pid, sub_count, permission, hidden,i_frame ) VALUES
|
||||||
|
<foreach collection="menuList" item="menu" index="index" separator=",">
|
||||||
|
(#{menu.menuId},#{menu.title},#{menu.pid},#{menu.subCount},#{menu.permission},#{menu.hidden},ifnull(#{menu.hidden},0))
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package io.dataease.controller.panel;
|
|||||||
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
import io.dataease.controller.request.panel.PanelLinkageRequest;
|
import io.dataease.controller.request.panel.PanelLinkageRequest;
|
||||||
|
import io.dataease.dto.PanelViewLinkageDTO;
|
||||||
import io.dataease.service.panel.PanelViewLinkageService;
|
import io.dataease.service.panel.PanelViewLinkageService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -30,4 +31,13 @@ public class PanelViewLinkageController {
|
|||||||
return panelViewLinkageService.getViewLinkageGather(request);
|
return panelViewLinkageService.getViewLinkageGather(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("获取仪表板视图联动信息")
|
||||||
|
@PostMapping("/saveLinkage")
|
||||||
|
public void saveLinkage(@RequestBody PanelLinkageRequest request){
|
||||||
|
panelViewLinkageService.saveLinkage(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
package io.dataease.controller.request.panel;
|
package io.dataease.controller.request.panel;
|
||||||
|
|
||||||
|
import io.dataease.dto.PanelViewLinkageDTO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author: wangjiahao
|
* Author: wangjiahao
|
||||||
@ -15,6 +18,16 @@ public class PanelLinkageRequest {
|
|||||||
|
|
||||||
private List<String> targetViewIds;
|
private List<String> targetViewIds;
|
||||||
|
|
||||||
|
private Map<String, PanelViewLinkageDTO> linkageInfo;
|
||||||
|
|
||||||
|
public Map<String, PanelViewLinkageDTO> getLinkageInfo() {
|
||||||
|
return linkageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLinkageInfo(Map<String, PanelViewLinkageDTO> linkageInfo) {
|
||||||
|
this.linkageInfo = linkageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
public String getPanelId() {
|
public String getPanelId() {
|
||||||
return panelId;
|
return panelId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package io.dataease.dto;
|
|||||||
|
|
||||||
import io.dataease.base.domain.DatasetTableField;
|
import io.dataease.base.domain.DatasetTableField;
|
||||||
import io.dataease.base.domain.PanelViewLinkage;
|
import io.dataease.base.domain.PanelViewLinkage;
|
||||||
|
import io.dataease.base.domain.PanelViewLinkageField;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -19,7 +20,7 @@ public class PanelViewLinkageDTO extends PanelViewLinkage {
|
|||||||
//关联状态
|
//关联状态
|
||||||
private boolean linkageActive = false;
|
private boolean linkageActive = false;
|
||||||
|
|
||||||
private List<PanelViewLinkageFieldDTO> linkageFields = new ArrayList<>();
|
private List<PanelViewLinkageField> linkageFields = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
private List<DatasetTableField> targetViewFields = new ArrayList<>();
|
private List<DatasetTableField> targetViewFields = new ArrayList<>();
|
||||||
@ -68,11 +69,11 @@ public class PanelViewLinkageDTO extends PanelViewLinkage {
|
|||||||
this.linkageActive = linkageActive;
|
this.linkageActive = linkageActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<PanelViewLinkageFieldDTO> getLinkageFields() {
|
public List<PanelViewLinkageField> getLinkageFields() {
|
||||||
return linkageFields;
|
return linkageFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLinkageFields(List<PanelViewLinkageFieldDTO> linkageFields) {
|
public void setLinkageFields(List<PanelViewLinkageField> linkageFields) {
|
||||||
this.linkageFields = linkageFields;
|
this.linkageFields = linkageFields;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,19 @@
|
|||||||
package io.dataease.service.panel;
|
package io.dataease.service.panel;
|
||||||
|
|
||||||
|
import io.dataease.base.domain.PanelViewLinkage;
|
||||||
|
import io.dataease.base.domain.PanelViewLinkageExample;
|
||||||
|
import io.dataease.base.domain.PanelViewLinkageField;
|
||||||
|
import io.dataease.base.mapper.PanelViewLinkageFieldMapper;
|
||||||
import io.dataease.base.mapper.PanelViewLinkageMapper;
|
import io.dataease.base.mapper.PanelViewLinkageMapper;
|
||||||
import io.dataease.base.mapper.ext.ExtPanelViewLinkageMapper;
|
import io.dataease.base.mapper.ext.ExtPanelViewLinkageMapper;
|
||||||
|
import io.dataease.commons.utils.AuthUtils;
|
||||||
import io.dataease.controller.request.panel.PanelLinkageRequest;
|
import io.dataease.controller.request.panel.PanelLinkageRequest;
|
||||||
import io.dataease.dto.PanelViewLinkageDTO;
|
import io.dataease.dto.PanelViewLinkageDTO;
|
||||||
|
import io.dataease.dto.PanelViewLinkageFieldDTO;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -22,6 +30,9 @@ public class PanelViewLinkageService {
|
|||||||
@Resource
|
@Resource
|
||||||
private PanelViewLinkageMapper panelViewLinkageMapper;
|
private PanelViewLinkageMapper panelViewLinkageMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PanelViewLinkageFieldMapper panelViewLinkageFieldMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ExtPanelViewLinkageMapper extPanelViewLinkageMapper;
|
private ExtPanelViewLinkageMapper extPanelViewLinkageMapper;
|
||||||
|
|
||||||
@ -29,9 +40,6 @@ public class PanelViewLinkageService {
|
|||||||
public Map<String, PanelViewLinkageDTO> getViewLinkageGather(PanelLinkageRequest request) {
|
public Map<String, PanelViewLinkageDTO> getViewLinkageGather(PanelLinkageRequest request) {
|
||||||
if(CollectionUtils.isNotEmpty(request.getTargetViewIds())){
|
if(CollectionUtils.isNotEmpty(request.getTargetViewIds())){
|
||||||
List<PanelViewLinkageDTO> linkageDTOList = extPanelViewLinkageMapper.getViewLinkageGather(request.getPanelId(),request.getSourceViewId(),request.getTargetViewIds());
|
List<PanelViewLinkageDTO> linkageDTOList = extPanelViewLinkageMapper.getViewLinkageGather(request.getPanelId(),request.getSourceViewId(),request.getTargetViewIds());
|
||||||
linkageDTOList.stream().forEach(linkage ->{
|
|
||||||
linkage.setTargetViewFields(extPanelViewLinkageMapper.queryTableField(linkage.getTableId()));
|
|
||||||
});
|
|
||||||
Map<String, PanelViewLinkageDTO> result = linkageDTOList.stream()
|
Map<String, PanelViewLinkageDTO> result = linkageDTOList.stream()
|
||||||
.collect(Collectors.toMap(PanelViewLinkageDTO::getTargetViewId,PanelViewLinkageDTO->PanelViewLinkageDTO));
|
.collect(Collectors.toMap(PanelViewLinkageDTO::getTargetViewId,PanelViewLinkageDTO->PanelViewLinkageDTO));
|
||||||
return result;
|
return result;
|
||||||
@ -39,5 +47,61 @@ public class PanelViewLinkageService {
|
|||||||
return new HashMap<>();
|
return new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void saveLinkage(PanelLinkageRequest request){
|
||||||
|
Long updateTime = System.currentTimeMillis();
|
||||||
|
Map<String, PanelViewLinkageDTO> linkageInfo = request.getLinkageInfo();
|
||||||
|
String sourceViewId = request.getSourceViewId();
|
||||||
|
String panelId = request.getPanelId();
|
||||||
|
|
||||||
|
Assert.notNull(sourceViewId,"source View ID can not be null");
|
||||||
|
Assert.notNull(panelId,"panelId can not be null");
|
||||||
|
|
||||||
|
//去掉source view 的信息
|
||||||
|
linkageInfo.remove(sourceViewId);
|
||||||
|
|
||||||
|
// 清理原有关系
|
||||||
|
extPanelViewLinkageMapper.deleteViewLinkageField(panelId,sourceViewId);
|
||||||
|
extPanelViewLinkageMapper.deleteViewLinkage(panelId,sourceViewId);
|
||||||
|
|
||||||
|
//重新建立关系
|
||||||
|
for(Map.Entry<String, PanelViewLinkageDTO> entry : linkageInfo.entrySet()){
|
||||||
|
String targetViewId = entry.getKey();
|
||||||
|
PanelViewLinkageDTO linkageDTO = entry.getValue();
|
||||||
|
List<PanelViewLinkageField> linkageFields = linkageDTO.getLinkageFields();
|
||||||
|
|
||||||
|
if(CollectionUtils.isNotEmpty(linkageFields)&&linkageDTO.isLinkageActive()){
|
||||||
|
String linkageId = UUID.randomUUID().toString();
|
||||||
|
PanelViewLinkage linkage = new PanelViewLinkage();
|
||||||
|
linkage.setId(linkageId);
|
||||||
|
linkage.setPanelId(panelId);
|
||||||
|
linkage.setSourceViewId(sourceViewId);
|
||||||
|
linkage.setTargetViewId(targetViewId);
|
||||||
|
linkage.setUpdatePeople(AuthUtils.getUser().getUsername());
|
||||||
|
linkage.setUpdateTime(updateTime);
|
||||||
|
panelViewLinkageMapper.insert(linkage);
|
||||||
|
|
||||||
|
linkageFields.stream().forEach(linkageField->{
|
||||||
|
linkageField.setId(UUID.randomUUID().toString());
|
||||||
|
linkageField.setLinkageId(linkageId);
|
||||||
|
linkageField.setUpdateTime(updateTime);
|
||||||
|
panelViewLinkageFieldMapper.insert(linkageField);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,33 @@
|
|||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for panel_view_linkage
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `panel_view_linkage`;
|
||||||
|
CREATE TABLE `panel_view_linkage` (
|
||||||
|
`id` varchar(50) NOT NULL,
|
||||||
|
`panel_id` varchar(50) DEFAULT NULL,
|
||||||
|
`source_view_id` varchar(50) DEFAULT NULL COMMENT '源视图id',
|
||||||
|
`target_view_id` varchar(50) DEFAULT NULL COMMENT '联动视图id',
|
||||||
|
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
|
||||||
|
`update_people` varchar(255) DEFAULT NULL COMMENT '更新人',
|
||||||
|
`ext1` varchar(2000) DEFAULT NULL,
|
||||||
|
`ext2` varchar(2000) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for panel_view_linkage_field
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `panel_view_linkage_field`;
|
||||||
|
CREATE TABLE `panel_view_linkage_field` (
|
||||||
|
`id` varchar(50) NOT NULL,
|
||||||
|
`linkage_id` varchar(50) DEFAULT NULL COMMENT '联动ID',
|
||||||
|
`source_field` varchar(255) DEFAULT NULL COMMENT '源视图字段',
|
||||||
|
`target_field` varchar(255) DEFAULT NULL COMMENT '目标视图字段',
|
||||||
|
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
@ -9,3 +9,12 @@ export function getViewLinkageGather(requestInfo) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function saveLinkage(requestInfo) {
|
||||||
|
return request({
|
||||||
|
url: '/linkage/saveLinkage',
|
||||||
|
method: 'post',
|
||||||
|
data: requestInfo,
|
||||||
|
loading: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,22 +1,68 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<el-popover
|
<el-popover
|
||||||
width="300"
|
width="400"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="11">
|
||||||
<div class="ellip">联动视图</div>
|
<div class="ellip">{{ sourceLinkageInfo.targetViewName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="11">
|
||||||
<div class="ellip">{{ linkageInfo.targetViewName }}</div>
|
<div class="ellip">{{ linkageInfo.targetViewName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
linkageInfo{{ linkageInfo }}
|
<el-row v-for="(item, index) in linkageInfo.linkageFields" :key="index">
|
||||||
|
<el-col :span="11">
|
||||||
|
<div class="select-filed">
|
||||||
|
<el-select v-model="item.sourceField" size="mini" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in sourceLinkageInfo.targetViewFields"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">
|
||||||
|
<svg-icon v-if="item.deType === 0" icon-class="field_text" class="field-icon-text" />
|
||||||
|
<svg-icon v-if="item.deType === 1" icon-class="field_time" class="field-icon-time" />
|
||||||
|
<svg-icon v-if="item.deType === 2 || item.value === 3" icon-class="field_value" class="field-icon-value" />
|
||||||
|
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
|
||||||
|
</span>
|
||||||
|
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11">
|
||||||
|
<div class="select-filed">
|
||||||
|
<el-select v-model="item.targetField" size="mini" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in linkageInfo.targetViewFields"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">
|
||||||
|
<svg-icon v-if="item.deType === 0" icon-class="field_text" class="field-icon-text" />
|
||||||
|
<svg-icon v-if="item.deType === 1" icon-class="field_time" class="field-icon-time" />
|
||||||
|
<svg-icon v-if="item.deType === 2 || item.value === 3" icon-class="field_value" class="field-icon-value" />
|
||||||
|
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
|
||||||
|
</span>
|
||||||
|
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<div>
|
||||||
|
<el-button icon="el-icon-delete" type="text" size="small" style="float: left" @click="deleteLinkageField(index)" />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-row class="bottom">
|
<el-row class="bottom">
|
||||||
<el-button size="mini" type="success" icon="el-icon-plus" round>追加联动依赖字段</el-button>
|
<el-button size="mini" type="success" icon="el-icon-plus" round @click="addLinkageField">追加联动依赖字段</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <el-button slot="reference">T</el-button>-->
|
<!-- <el-button slot="reference">T</el-button>-->
|
||||||
@ -60,6 +106,9 @@ export default {
|
|||||||
linkageInfo() {
|
linkageInfo() {
|
||||||
return this.targetLinkageInfo[this.element.propValue.viewId]
|
return this.targetLinkageInfo[this.element.propValue.viewId]
|
||||||
},
|
},
|
||||||
|
sourceLinkageInfo() {
|
||||||
|
return this.targetLinkageInfo[this.curLinkageView.propValue.viewId]
|
||||||
|
},
|
||||||
...mapState([
|
...mapState([
|
||||||
'menuTop',
|
'menuTop',
|
||||||
'menuLeft',
|
'menuLeft',
|
||||||
@ -81,6 +130,16 @@ export default {
|
|||||||
},
|
},
|
||||||
linkageEdit() {
|
linkageEdit() {
|
||||||
|
|
||||||
|
},
|
||||||
|
deleteLinkageField(index) {
|
||||||
|
this.linkageInfo.linkageFields.splice(index, 1)
|
||||||
|
},
|
||||||
|
addLinkageField() {
|
||||||
|
const linkageFieldItem = {
|
||||||
|
sourceViewId: null,
|
||||||
|
targetViewId: null
|
||||||
|
}
|
||||||
|
this.linkageInfo.linkageFields.push(linkageFieldItem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -92,6 +151,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
|
margin-top: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -110,4 +170,18 @@ export default {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.select-filed{
|
||||||
|
/*width: 100%;*/
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
overflow: hidden;/*超出部分隐藏*/
|
||||||
|
white-space: nowrap;/*不换行*/
|
||||||
|
text-overflow:ellipsis;/*超出部分文字以...显示*/
|
||||||
|
color: #3d4d66;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 35px;
|
||||||
|
height: 35px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -124,7 +124,8 @@ export default {
|
|||||||
},
|
},
|
||||||
linkageSetting() {
|
linkageSetting() {
|
||||||
debugger
|
debugger
|
||||||
const targetViewIds = this.componentData.filter(item => item.type === 'view' && item.propValue && item.propValue.viewId && item !== this.curComponent)
|
// sourceViewId 也加入查询
|
||||||
|
const targetViewIds = this.componentData.filter(item => item.type === 'view' && item.propValue && item.propValue.viewId)
|
||||||
.map(item => item.propValue.viewId)
|
.map(item => item.propValue.viewId)
|
||||||
|
|
||||||
// 获取当前仪表板当前视图联动信息
|
// 获取当前仪表板当前视图联动信息
|
||||||
|
|||||||
@ -101,6 +101,7 @@ import { commonStyle, commonAttr } from '@/components/canvas/custom-component/co
|
|||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||||
import { panelSave } from '@/api/panel/panel'
|
import { panelSave } from '@/api/panel/panel'
|
||||||
|
import { saveLinkage } from '@/api/panel/linkage'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
import {
|
import {
|
||||||
DEFAULT_COMMON_CANVAS_STYLE_STRING
|
DEFAULT_COMMON_CANVAS_STYLE_STRING
|
||||||
@ -137,7 +138,9 @@ export default {
|
|||||||
'changeTimes',
|
'changeTimes',
|
||||||
'snapshotIndex',
|
'snapshotIndex',
|
||||||
'lastSaveSnapshotIndex',
|
'lastSaveSnapshotIndex',
|
||||||
'linkageSettingStatus'
|
'linkageSettingStatus',
|
||||||
|
'curLinkageView',
|
||||||
|
'targetLinkageInfo'
|
||||||
]),
|
]),
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
@ -316,7 +319,14 @@ export default {
|
|||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
saveLinkage() {
|
saveLinkage() {
|
||||||
this.cancelLinkageSettingStatus()
|
const request = {
|
||||||
|
panelId: this.$store.state.panel.panelInfo.id,
|
||||||
|
sourceViewId: this.curLinkageView.propValue.viewId,
|
||||||
|
linkageInfo: this.targetLinkageInfo
|
||||||
|
}
|
||||||
|
saveLinkage(request).then(rsp => {
|
||||||
|
this.cancelLinkageSettingStatus()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
cancelLinkage() {
|
cancelLinkage() {
|
||||||
this.cancelLinkageSettingStatus()
|
this.cancelLinkageSettingStatus()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user