提交 89652ad8 authored 作者: wangjiahao's avatar wangjiahao

feat: 仪表板支持接收外部参数

上级 343a3869
package io.dataease.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class PanelOuterParams implements Serializable {
private String paramsId;
private String panelId;
private Boolean checked;
private String remark;
private String copyFrom;
private String copyId;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.dataease.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class PanelOuterParamsInfo implements Serializable {
private String paramsInfoId;
private String paramsId;
private String paramName;
private Boolean checked;
private String copyFrom;
private String copyId;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.dataease.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class PanelOuterParamsTargetViewInfo implements Serializable {
private String targetId;
private String paramsInfoId;
private String targetViewId;
private String targetFieldId;
private String copyFrom;
private String copyId;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.dataease.base.mapper;
import io.dataease.base.domain.PanelOuterParamsInfo;
import io.dataease.base.domain.PanelOuterParamsInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PanelOuterParamsInfoMapper {
long countByExample(PanelOuterParamsInfoExample example);
int deleteByExample(PanelOuterParamsInfoExample example);
int deleteByPrimaryKey(String paramsInfoId);
int insert(PanelOuterParamsInfo record);
int insertSelective(PanelOuterParamsInfo record);
List<PanelOuterParamsInfo> selectByExample(PanelOuterParamsInfoExample example);
PanelOuterParamsInfo selectByPrimaryKey(String paramsInfoId);
int updateByExampleSelective(@Param("record") PanelOuterParamsInfo record, @Param("example") PanelOuterParamsInfoExample example);
int updateByExample(@Param("record") PanelOuterParamsInfo record, @Param("example") PanelOuterParamsInfoExample example);
int updateByPrimaryKeySelective(PanelOuterParamsInfo record);
int updateByPrimaryKey(PanelOuterParamsInfo record);
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.dataease.base.mapper.PanelOuterParamsInfoMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.PanelOuterParamsInfo">
<id column="params_info_id" jdbcType="VARCHAR" property="paramsInfoId" />
<result column="params_id" jdbcType="VARCHAR" property="paramsId" />
<result column="param_name" jdbcType="VARCHAR" property="paramName" />
<result column="checked" jdbcType="BIT" property="checked" />
<result column="copy_from" jdbcType="VARCHAR" property="copyFrom" />
<result column="copy_id" jdbcType="VARCHAR" property="copyId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
params_info_id, params_id, param_name, `checked`, copy_from, copy_id
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.PanelOuterParamsInfoExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from panel_outer_params_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from panel_outer_params_info
where params_info_id = #{paramsInfoId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from panel_outer_params_info
where params_info_id = #{paramsInfoId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.PanelOuterParamsInfoExample">
delete from panel_outer_params_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.PanelOuterParamsInfo">
insert into panel_outer_params_info (params_info_id, params_id, param_name,
`checked`, copy_from, copy_id
)
values (#{paramsInfoId,jdbcType=VARCHAR}, #{paramsId,jdbcType=VARCHAR}, #{paramName,jdbcType=VARCHAR},
#{checked,jdbcType=BIT}, #{copyFrom,jdbcType=VARCHAR}, #{copyId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.PanelOuterParamsInfo">
insert into panel_outer_params_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="paramsInfoId != null">
params_info_id,
</if>
<if test="paramsId != null">
params_id,
</if>
<if test="paramName != null">
param_name,
</if>
<if test="checked != null">
`checked`,
</if>
<if test="copyFrom != null">
copy_from,
</if>
<if test="copyId != null">
copy_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="paramsInfoId != null">
#{paramsInfoId,jdbcType=VARCHAR},
</if>
<if test="paramsId != null">
#{paramsId,jdbcType=VARCHAR},
</if>
<if test="paramName != null">
#{paramName,jdbcType=VARCHAR},
</if>
<if test="checked != null">
#{checked,jdbcType=BIT},
</if>
<if test="copyFrom != null">
#{copyFrom,jdbcType=VARCHAR},
</if>
<if test="copyId != null">
#{copyId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.PanelOuterParamsInfoExample" resultType="java.lang.Long">
select count(*) from panel_outer_params_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update panel_outer_params_info
<set>
<if test="record.paramsInfoId != null">
params_info_id = #{record.paramsInfoId,jdbcType=VARCHAR},
</if>
<if test="record.paramsId != null">
params_id = #{record.paramsId,jdbcType=VARCHAR},
</if>
<if test="record.paramName != null">
param_name = #{record.paramName,jdbcType=VARCHAR},
</if>
<if test="record.checked != null">
`checked` = #{record.checked,jdbcType=BIT},
</if>
<if test="record.copyFrom != null">
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
</if>
<if test="record.copyId != null">
copy_id = #{record.copyId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update panel_outer_params_info
set params_info_id = #{record.paramsInfoId,jdbcType=VARCHAR},
params_id = #{record.paramsId,jdbcType=VARCHAR},
param_name = #{record.paramName,jdbcType=VARCHAR},
`checked` = #{record.checked,jdbcType=BIT},
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
copy_id = #{record.copyId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.PanelOuterParamsInfo">
update panel_outer_params_info
<set>
<if test="paramsId != null">
params_id = #{paramsId,jdbcType=VARCHAR},
</if>
<if test="paramName != null">
param_name = #{paramName,jdbcType=VARCHAR},
</if>
<if test="checked != null">
`checked` = #{checked,jdbcType=BIT},
</if>
<if test="copyFrom != null">
copy_from = #{copyFrom,jdbcType=VARCHAR},
</if>
<if test="copyId != null">
copy_id = #{copyId,jdbcType=VARCHAR},
</if>
</set>
where params_info_id = #{paramsInfoId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.PanelOuterParamsInfo">
update panel_outer_params_info
set params_id = #{paramsId,jdbcType=VARCHAR},
param_name = #{paramName,jdbcType=VARCHAR},
`checked` = #{checked,jdbcType=BIT},
copy_from = #{copyFrom,jdbcType=VARCHAR},
copy_id = #{copyId,jdbcType=VARCHAR}
where params_info_id = #{paramsInfoId,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
package io.dataease.base.mapper;
import io.dataease.base.domain.PanelOuterParams;
import io.dataease.base.domain.PanelOuterParamsExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PanelOuterParamsMapper {
long countByExample(PanelOuterParamsExample example);
int deleteByExample(PanelOuterParamsExample example);
int deleteByPrimaryKey(String paramsId);
int insert(PanelOuterParams record);
int insertSelective(PanelOuterParams record);
List<PanelOuterParams> selectByExample(PanelOuterParamsExample example);
PanelOuterParams selectByPrimaryKey(String paramsId);
int updateByExampleSelective(@Param("record") PanelOuterParams record, @Param("example") PanelOuterParamsExample example);
int updateByExample(@Param("record") PanelOuterParams record, @Param("example") PanelOuterParamsExample example);
int updateByPrimaryKeySelective(PanelOuterParams record);
int updateByPrimaryKey(PanelOuterParams record);
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.dataease.base.mapper.PanelOuterParamsMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.PanelOuterParams">
<id column="params_id" jdbcType="VARCHAR" property="paramsId" />
<result column="panel_id" jdbcType="VARCHAR" property="panelId" />
<result column="checked" jdbcType="BIT" property="checked" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="copy_from" jdbcType="VARCHAR" property="copyFrom" />
<result column="copy_id" jdbcType="VARCHAR" property="copyId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
params_id, panel_id, `checked`, remark, copy_from, copy_id
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.PanelOuterParamsExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from panel_outer_params
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from panel_outer_params
where params_id = #{paramsId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from panel_outer_params
where params_id = #{paramsId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.PanelOuterParamsExample">
delete from panel_outer_params
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.PanelOuterParams">
insert into panel_outer_params (params_id, panel_id, `checked`,
remark, copy_from, copy_id
)
values (#{paramsId,jdbcType=VARCHAR}, #{panelId,jdbcType=VARCHAR}, #{checked,jdbcType=BIT},
#{remark,jdbcType=VARCHAR}, #{copyFrom,jdbcType=VARCHAR}, #{copyId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.PanelOuterParams">
insert into panel_outer_params
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="paramsId != null">
params_id,
</if>
<if test="panelId != null">
panel_id,
</if>
<if test="checked != null">
`checked`,
</if>
<if test="remark != null">
remark,
</if>
<if test="copyFrom != null">
copy_from,
</if>
<if test="copyId != null">
copy_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="paramsId != null">
#{paramsId,jdbcType=VARCHAR},
</if>
<if test="panelId != null">
#{panelId,jdbcType=VARCHAR},
</if>
<if test="checked != null">
#{checked,jdbcType=BIT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="copyFrom != null">
#{copyFrom,jdbcType=VARCHAR},
</if>
<if test="copyId != null">
#{copyId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.PanelOuterParamsExample" resultType="java.lang.Long">
select count(*) from panel_outer_params
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update panel_outer_params
<set>
<if test="record.paramsId != null">
params_id = #{record.paramsId,jdbcType=VARCHAR},
</if>
<if test="record.panelId != null">
panel_id = #{record.panelId,jdbcType=VARCHAR},
</if>
<if test="record.checked != null">
`checked` = #{record.checked,jdbcType=BIT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.copyFrom != null">
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
</if>
<if test="record.copyId != null">
copy_id = #{record.copyId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update panel_outer_params
set params_id = #{record.paramsId,jdbcType=VARCHAR},
panel_id = #{record.panelId,jdbcType=VARCHAR},
`checked` = #{record.checked,jdbcType=BIT},
remark = #{record.remark,jdbcType=VARCHAR},
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
copy_id = #{record.copyId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.PanelOuterParams">
update panel_outer_params
<set>
<if test="panelId != null">
panel_id = #{panelId,jdbcType=VARCHAR},
</if>
<if test="checked != null">
`checked` = #{checked,jdbcType=BIT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="copyFrom != null">
copy_from = #{copyFrom,jdbcType=VARCHAR},
</if>
<if test="copyId != null">
copy_id = #{copyId,jdbcType=VARCHAR},
</if>
</set>
where params_id = #{paramsId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.PanelOuterParams">
update panel_outer_params
set panel_id = #{panelId,jdbcType=VARCHAR},
`checked` = #{checked,jdbcType=BIT},
remark = #{remark,jdbcType=VARCHAR},
copy_from = #{copyFrom,jdbcType=VARCHAR},
copy_id = #{copyId,jdbcType=VARCHAR}
where params_id = #{paramsId,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
package io.dataease.base.mapper;
import io.dataease.base.domain.PanelOuterParamsTargetViewInfo;
import io.dataease.base.domain.PanelOuterParamsTargetViewInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PanelOuterParamsTargetViewInfoMapper {
long countByExample(PanelOuterParamsTargetViewInfoExample example);
int deleteByExample(PanelOuterParamsTargetViewInfoExample example);
int deleteByPrimaryKey(String targetId);
int insert(PanelOuterParamsTargetViewInfo record);
int insertSelective(PanelOuterParamsTargetViewInfo record);
List<PanelOuterParamsTargetViewInfo> selectByExample(PanelOuterParamsTargetViewInfoExample example);
PanelOuterParamsTargetViewInfo selectByPrimaryKey(String targetId);
int updateByExampleSelective(@Param("record") PanelOuterParamsTargetViewInfo record, @Param("example") PanelOuterParamsTargetViewInfoExample example);
int updateByExample(@Param("record") PanelOuterParamsTargetViewInfo record, @Param("example") PanelOuterParamsTargetViewInfoExample example);
int updateByPrimaryKeySelective(PanelOuterParamsTargetViewInfo record);
int updateByPrimaryKey(PanelOuterParamsTargetViewInfo record);
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.dataease.base.mapper.PanelOuterParamsTargetViewInfoMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.PanelOuterParamsTargetViewInfo">
<id column="target_id" jdbcType="VARCHAR" property="targetId" />
<result column="params_info_id" jdbcType="VARCHAR" property="paramsInfoId" />
<result column="target_view_id" jdbcType="VARCHAR" property="targetViewId" />
<result column="target_field_id" jdbcType="VARCHAR" property="targetFieldId" />
<result column="copy_from" jdbcType="VARCHAR" property="copyFrom" />
<result column="copy_id" jdbcType="VARCHAR" property="copyId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
target_id, params_info_id, target_view_id, target_field_id, copy_from, copy_id
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.PanelOuterParamsTargetViewInfoExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from panel_outer_params_target_view_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from panel_outer_params_target_view_info
where target_id = #{targetId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from panel_outer_params_target_view_info
where target_id = #{targetId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.PanelOuterParamsTargetViewInfoExample">
delete from panel_outer_params_target_view_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.PanelOuterParamsTargetViewInfo">
insert into panel_outer_params_target_view_info (target_id, params_info_id, target_view_id,
target_field_id, copy_from, copy_id
)
values (#{targetId,jdbcType=VARCHAR}, #{paramsInfoId,jdbcType=VARCHAR}, #{targetViewId,jdbcType=VARCHAR},
#{targetFieldId,jdbcType=VARCHAR}, #{copyFrom,jdbcType=VARCHAR}, #{copyId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.PanelOuterParamsTargetViewInfo">
insert into panel_outer_params_target_view_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="targetId != null">
target_id,
</if>
<if test="paramsInfoId != null">
params_info_id,
</if>
<if test="targetViewId != null">
target_view_id,
</if>
<if test="targetFieldId != null">
target_field_id,
</if>
<if test="copyFrom != null">
copy_from,
</if>
<if test="copyId != null">
copy_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="targetId != null">
#{targetId,jdbcType=VARCHAR},
</if>
<if test="paramsInfoId != null">
#{paramsInfoId,jdbcType=VARCHAR},
</if>
<if test="targetViewId != null">
#{targetViewId,jdbcType=VARCHAR},
</if>
<if test="targetFieldId != null">
#{targetFieldId,jdbcType=VARCHAR},
</if>
<if test="copyFrom != null">
#{copyFrom,jdbcType=VARCHAR},
</if>
<if test="copyId != null">
#{copyId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.PanelOuterParamsTargetViewInfoExample" resultType="java.lang.Long">
select count(*) from panel_outer_params_target_view_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update panel_outer_params_target_view_info
<set>
<if test="record.targetId != null">
target_id = #{record.targetId,jdbcType=VARCHAR},
</if>
<if test="record.paramsInfoId != null">
params_info_id = #{record.paramsInfoId,jdbcType=VARCHAR},
</if>
<if test="record.targetViewId != null">
target_view_id = #{record.targetViewId,jdbcType=VARCHAR},
</if>
<if test="record.targetFieldId != null">
target_field_id = #{record.targetFieldId,jdbcType=VARCHAR},
</if>
<if test="record.copyFrom != null">
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
</if>
<if test="record.copyId != null">
copy_id = #{record.copyId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update panel_outer_params_target_view_info
set target_id = #{record.targetId,jdbcType=VARCHAR},
params_info_id = #{record.paramsInfoId,jdbcType=VARCHAR},
target_view_id = #{record.targetViewId,jdbcType=VARCHAR},
target_field_id = #{record.targetFieldId,jdbcType=VARCHAR},
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
copy_id = #{record.copyId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.PanelOuterParamsTargetViewInfo">
update panel_outer_params_target_view_info
<set>
<if test="paramsInfoId != null">
params_info_id = #{paramsInfoId,jdbcType=VARCHAR},
</if>
<if test="targetViewId != null">
target_view_id = #{targetViewId,jdbcType=VARCHAR},
</if>
<if test="targetFieldId != null">
target_field_id = #{targetFieldId,jdbcType=VARCHAR},
</if>
<if test="copyFrom != null">
copy_from = #{copyFrom,jdbcType=VARCHAR},
</if>
<if test="copyId != null">
copy_id = #{copyId,jdbcType=VARCHAR},
</if>
</set>
where target_id = #{targetId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.PanelOuterParamsTargetViewInfo">
update panel_outer_params_target_view_info
set params_info_id = #{paramsInfoId,jdbcType=VARCHAR},
target_view_id = #{targetViewId,jdbcType=VARCHAR},
target_field_id = #{targetFieldId,jdbcType=VARCHAR},
copy_from = #{copyFrom,jdbcType=VARCHAR},
copy_id = #{copyId,jdbcType=VARCHAR}
where target_id = #{targetId,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
package io.dataease.base.mapper.ext;
import io.dataease.dto.panel.outerParams.PanelOuterParamsDTO;
import org.apache.ibatis.annotations.Param;
public interface ExtPanelOuterParamsMapper {
PanelOuterParamsDTO queryWithPanelId(@Param("panelId") String panelId);
void deleteOuterParamsWithPanelId(@Param("panelId") String panelId);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.dataease.base.mapper.ext.ExtPanelOuterParamsMapper">
<resultMap id="BaseResultMapDTO" type="io.dataease.dto.panel.outerParams.PanelOuterParamsDTO"
extends="io.dataease.base.mapper.PanelOuterParamsMapper.BaseResultMap">
<collection property="outerParamsInfoArray" ofType="io.dataease.dto.panel.outerParams.PanelOuterParamsInfoDTO"
column="{panel_id=panel_id}"
select="getOuterParamsInfo">
</collection>
</resultMap>
<resultMap id="OuterParamsInfoMap" type="io.dataease.dto.panel.outerParams.PanelOuterParamsInfoDTO" extends="io.dataease.base.mapper.PanelOuterParamsInfoMapper.BaseResultMap">
<collection property="targetViewInfoList" ofType="io.dataease.base.domain.PanelOuterParamsTargetViewInfo">
<result column="target_view_id" jdbcType="VARCHAR" property="targetViewId"/>
<result column="target_field_id" jdbcType="VARCHAR" property="targetFieldId"/>
</collection>
</resultMap>
<select id="getOuterParamsInfo" resultMap="OuterParamsInfoMap">
SELECT
pop.panel_id,
popi.params_info_id,
popi.param_name,
ifnull( popi.checked, 0 ) AS checked,
poptvi.target_view_id,
poptvi.target_field_id
FROM
panel_outer_params pop
LEFT JOIN panel_outer_params_info popi ON pop.params_id = popi.params_id
LEFT JOIN panel_outer_params_target_view_info poptvi ON popi.params_info_id = poptvi.params_info_id
WHERE
pop.panel_id = #{panel_id}
ORDER BY
ifnull( popi.checked, 0 ) DESC
</select>
<select id="queryWithPanelId" resultMap="BaseResultMapDTO">
SELECT
#{panelId} as panel_id,
ifnull( panel_outer_params.checked, 0 ) AS checked
FROM
panel_group
LEFT JOIN panel_outer_params ON panel_group.id = panel_outer_params.panel_id
WHERE
panel_group.id = #{panelId}
</select>
<delete id="deleteOuterParamsWithPanelId" >
DELETE poptvi,popi,pop
FROM
panel_outer_params_target_view_info poptvi,
panel_outer_params_info popi,
panel_outer_params pop
WHERE
poptvi.params_info_id = popi.params_info_id
AND popi.params_id = pop.params_id
AND pop.panel_id = #{panelId}
</delete>
</mapper>
package io.dataease.controller.panel;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.dataease.base.domain.PanelOuterParams;
import io.dataease.dto.panel.linkJump.PanelLinkJumpDTO;
import io.dataease.dto.panel.outerParams.PanelOuterParamsDTO;
import io.dataease.service.panel.PanelOuterParamsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* Author: wangjiahao
* Date: 2022/3/17
* Description:
*/
@Api(tags = "仪表板:外部参数")
@ApiSupport(order = 172)
@RestController
@RequestMapping("outerParams")
public class PanelOuterParamsController {
@Resource
private PanelOuterParamsService panelOuterParamsService;
@ApiOperation("根据仪表板ID获取外部参数信息")
@GetMapping("/queryWithPanelId/{panelId}")
public PanelOuterParamsDTO queryWithPanelId(@PathVariable("panelId") String panelId){
return panelOuterParamsService.queryWithPanelId(panelId) ;
}
@ApiOperation("更新外部参数信息")
@PostMapping("/updateOuterParamsSet")
public void updateOuterParamsSet(@RequestBody PanelOuterParamsDTO OuterParamsDTO) {
panelOuterParamsService.updateOuterParamsSet(OuterParamsDTO);
}
}
package io.dataease.dto.panel.outerParams;
import io.dataease.base.domain.PanelOuterParams;
import lombok.Data;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Author: wangjiahao
* Date: 2022/3/17
* Description:
*/
@Data
public class PanelOuterParamsDTO extends PanelOuterParams {
private List<String> targetInfoList;
private List<PanelOuterParamsInfoDTO> outerParamsInfoArray = new ArrayList<>();
private Map<String,PanelOuterParamsInfoDTO> mapOuterParamsInfoArray = new HashMap<>();
}
package io.dataease.dto.panel.outerParams;
import io.dataease.base.domain.PanelOuterParamsInfo;
import io.dataease.base.domain.PanelOuterParamsTargetViewInfo;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Author: wangjiahao
* Date: 2022/3/17
* Description:
*/
@Data
public class PanelOuterParamsInfoDTO extends PanelOuterParamsInfo {
private String panelId;
private List<PanelOuterParamsTargetViewInfo> targetViewInfoList=new ArrayList<>();
}
package io.dataease.service.panel;
import io.dataease.base.mapper.PanelOuterParamsInfoMapper;
import io.dataease.base.mapper.PanelOuterParamsMapper;
import io.dataease.base.mapper.PanelOuterParamsTargetViewInfoMapper;
import io.dataease.base.mapper.ext.ExtPanelOuterParamsMapper;
import io.dataease.dto.panel.linkJump.PanelLinkJumpDTO;
import io.dataease.dto.panel.outerParams.PanelOuterParamsDTO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Optional;
import java.util.UUID;
/**
* Author: wangjiahao
* Date: 2022/3/17
* Description:
*/
@Service
public class PanelOuterParamsService {
@Resource
private ExtPanelOuterParamsMapper extPanelOuterParamsMapper;
@Resource
private PanelOuterParamsMapper panelOuterParamsMapper;
@Resource
private PanelOuterParamsInfoMapper panelOuterParamsInfoMapper;
@Resource
private PanelOuterParamsTargetViewInfoMapper panelOuterParamsTargetViewInfoMapper;
public PanelOuterParamsDTO queryWithPanelId(String panelId){
PanelOuterParamsDTO panelOuterParamsDTO = extPanelOuterParamsMapper.queryWithPanelId(panelId);
return panelOuterParamsDTO;
}
@Transactional
public void updateOuterParamsSet(PanelOuterParamsDTO outerParamsDTO) {
String panelId = outerParamsDTO.getPanelId();
Assert.notNull(panelId, "panelId cannot be null");
//清理原有数据
extPanelOuterParamsMapper.deleteOuterParamsWithPanelId(panelId);
// 插入新的数据
String paramsId = UUID.randomUUID().toString();
outerParamsDTO.setParamsId(paramsId);
panelOuterParamsMapper.insertSelective(outerParamsDTO);
Optional.ofNullable(outerParamsDTO.getOuterParamsInfoArray()).orElse(new ArrayList<>()).forEach(outerParamsInfo -> {
String paramsInfoId = UUID.randomUUID().toString();
outerParamsInfo.setParamsInfoId(paramsInfoId);
outerParamsInfo.setParamsId(paramsId);
panelOuterParamsInfoMapper.insertSelective(outerParamsInfo);
Optional.ofNullable(outerParamsInfo.getTargetViewInfoList()).orElse(new ArrayList<>()).forEach(targetViewInfo -> {
String targetViewInfoId = UUID.randomUUID().toString();
targetViewInfo.setTargetId(targetViewInfoId);
targetViewInfo.setParamsInfoId(paramsInfoId);
panelOuterParamsTargetViewInfoMapper.insertSelective(targetViewInfo);
});
});
}
}
......@@ -63,8 +63,8 @@
<!-- <table tableName="de_engine">-->
<!-- <columnOverride column="configuration" property="configuration" javaType="java.lang.String"/>-->
<!-- </table>-->
<table tableName="panel_view"/>
<table tableName="chart_view"/>
<table tableName="chart_view_cache"/>
<table tableName="panel_outer_params"/>
<table tableName="panel_outer_params_info"/>
<table tableName="panel_outer_params_target_view_info"/>
</context>
</generatorConfiguration>
import request from '@/utils/request'
export function queryWithPanelId(panelId) {
return request({
url: '/outerParams/queryWithPanelId/' + panelId,
method: 'get'
})
}
export function updateOuterParamsSet(requestInfo) {
return request({
url: '/outerParams/updateOuterParamsSet',
method: 'post',
data: requestInfo,
loading: true
})
}
......@@ -38,6 +38,9 @@
<el-tooltip :content="$t('panel.fullscreen_preview')">
<el-button class="el-icon-view" size="mini" circle @click="clickPreview" />
</el-tooltip>
<!-- <el-tooltip :content="$t('panel.params_setting')">-->
<!-- <el-button class="icon iconfont-tb icon-canshu" size="mini" circle @click="openOuterParamsSet" />-->
<!-- </el-tooltip>-->
<span style="float: right;margin-left: 10px">
<el-button size="mini" :disabled="saveButtonDisabled" @click="save(false)">
{{ $t('commons.save') }}
......@@ -299,6 +302,9 @@ export default {
clickPreview() {
this.$emit('previewFullScreen')
},
openOuterParamsSet() {
this.$emit('outerParamsSetVisibleChange', true)
},
changeAidedDesign() {
this.$emit('changeAidedDesign')
},
......
......@@ -1381,6 +1381,7 @@ export default {
sure_bt: 'Confirm'
},
panel: {
params_setting: 'Outer Params Setting',
template_view_tips: "Template's Views. Please Change",
no_auth_role: 'Unshared roles',
auth_role: 'Shared roles',
......
......@@ -1382,6 +1382,7 @@ export default {
sure_bt: '確定'
},
panel: {
params_setting: '外部参数设置',
template_view_tips: '当前是模板视图,请点击更换数据集',
no_auth_role: '未分享角色',
auth_role: '已分享角色',
......
......@@ -1390,6 +1390,7 @@ export default {
sure_bt: '确定'
},
panel: {
params_setting: '外部参数设置',
template_view_tips: '当前是模板视图,请点击更换数据集',
no_auth_role: '未分享角色',
auth_role: '已分享角色',
......
......@@ -54,6 +54,12 @@
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe6d7;</span>
<div class="name">参数</div>
<div class="code-name">&amp;#xe6d7;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe606;</span>
<div class="name">更换</div>
......@@ -186,6 +192,12 @@
<div class="code-name">&amp;#xe8e6;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xeb86;</span>
<div class="name">右悬浮-选中</div>
<div class="code-name">&amp;#xeb86;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe62a;</span>
<div class="name">44.tabs</div>
......@@ -504,9 +516,9 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1642061879222') format('woff2'),
url('iconfont.woff?t=1642061879222') format('woff'),
url('iconfont.ttf?t=1642061879222') format('truetype');
src: url('iconfont.woff2?t=1647483965100') format('woff2'),
url('iconfont.woff?t=1647483965100') format('woff'),
url('iconfont.ttf?t=1647483965100') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
......@@ -532,6 +544,15 @@
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-canshu"></span>
<div class="name">
参数
</div>
<div class="code-name">.icon-canshu
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-genghuan"></span>
<div class="name">
......@@ -730,6 +751,15 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-youxuanfu-copy-copy"></span>
<div class="name">
右悬浮-选中
</div>
<div class="code-name">.icon-youxuanfu-copy-copy
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-tabs"></span>
<div class="name">
......@@ -1207,6 +1237,14 @@
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-canshu"></use>
</svg>
<div class="name">参数</div>
<div class="code-name">#icon-canshu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-genghuan"></use>
......@@ -1383,6 +1421,14 @@
<div class="code-name">#icon-xuanfuanniu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-youxuanfu-copy-copy"></use>
</svg>
<div class="name">右悬浮-选中</div>
<div class="code-name">#icon-youxuanfu-copy-copy</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-tabs"></use>
......
@font-face {
font-family: "iconfont"; /* Project id 2459092 */
src: url('iconfont.woff2?t=1642061879222') format('woff2'),
url('iconfont.woff?t=1642061879222') format('woff'),
url('iconfont.ttf?t=1642061879222') format('truetype');
src: url('iconfont.woff2?t=1647483965100') format('woff2'),
url('iconfont.woff?t=1647483965100') format('woff'),
url('iconfont.ttf?t=1647483965100') format('truetype');
}
.iconfont {
......@@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-canshu:before {
content: "\e6d7";
}
.icon-genghuan:before {
content: "\e606";
}
......@@ -101,6 +105,10 @@
content: "\e8e6";
}
.icon-youxuanfu-copy-copy:before {
content: "\eb86";
}
.icon-tabs:before {
content: "\e62a";
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,6 +5,13 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "19610186",
"name": "参数",
"font_class": "canshu",
"unicode": "e6d7",
"unicode_decimal": 59095
},
{
"icon_id": "12851123",
"name": "更换",
......@@ -159,6 +166,13 @@
"unicode": "e8e6",
"unicode_decimal": 59622
},
{
"icon_id": "27514350",
"name": "右悬浮-选中",
"font_class": "youxuanfu-copy-copy",
"unicode": "eb86",
"unicode_decimal": 60294
},
{
"icon_id": "15196968",
"name": "44.tabs",
......
......@@ -18,6 +18,7 @@
@showPanel="showPanel"
@previewFullScreen="previewFullScreen"
@changeAidedDesign="changeAidedDesign"
@outerParamsSetVisibleChange="outerParamsSetVisibleChange"
/>
</el-col>
</el-header>
......@@ -312,6 +313,18 @@
@newViewInfo="newViewInfo"
/>
<!--仪表板外部参数设置组件-->
<el-dialog
:visible.sync="outerParamsSetVisible"
width="900px"
class="dialog-css"
:show-close="true"
:destroy-on-close="true"
:append-to-body="true"
>
<OuterParamsSet v-if="outerParamsSetVisible" @closeOuterParamsSetDialog="closeOuterParamsSetDialog" />
</el-dialog>
</el-row>
</template>
......@@ -334,14 +347,14 @@ import componentList, {
import { mapState } from 'vuex'
import { uuid } from 'vue-uuid'
import Toolbar from '@/components/canvas/components/Toolbar'
import { initPanelComponentsData, initPanelData, initViewCache } from '@/api/panel/panel'
import { initPanelData, initViewCache } from '@/api/panel/panel'
import Preview from '@/components/canvas/components/Editor/Preview'
import AttrListExtend from '@/components/canvas/components/AttrListExtend'
import elementResizeDetectorMaker from 'element-resize-detector'
import AssistComponent from '@/views/panel/AssistComponent'
import PanelTextEditor from '@/components/canvas/custom-component/PanelTextEditor'
import ChartGroup from '@/views/chart/group/Group'
import { chartCopy, searchAdviceSceneId } from '@/api/chart/chart'
import { chartCopy } from '@/api/chart/chart'
// 引入样式
import '@/components/canvas/assets/iconfont/iconfont.css'
import '@/components/canvas/styles/animate.css'
......@@ -354,10 +367,12 @@ import TextAttr from '@/components/canvas/components/TextAttr'
import ComponentWait from '@/views/panel/edit/ComponentWait'
import { deleteEnshrine, saveEnshrine, starStatus } from '@/api/panel/enshrine'
import ChartEdit from '@/views/chart/view/ChartEdit'
import OuterParamsSet from '@/views/panel/OuterParamsSet/index'
export default {
name: 'PanelEdit',
components: {
OuterParamsSet,
ComponentWait,
DeMainContainer,
DeContainer,
......@@ -378,6 +393,7 @@ export default {
},
data() {
return {
outerParamsSetVisible: false,
autoMoveOffSet: 15,
mobileEditorShow: true,
hasStar: false,
......@@ -596,6 +612,9 @@ export default {
elx && elx.remove()
},
methods: {
closeOuterParamsSetDialog(){
this.outerParamsSetVisible = false
},
changeRightDrawOpen(param) {
this.rightDrawOpen = param
if (this.rightDrawOpen) {
......@@ -860,6 +879,9 @@ export default {
changeAidedDesign() {
this.aidedButtonActive = !this.aidedButtonActive
},
outerParamsSetVisibleChange(param) {
this.outerParamsSetVisible = param
},
getOriginStyle(value) {
const scale = this.canvasStyleData.scale
const result = value / (scale / 100)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论