forked from github/dataease
feat: 视图所有操作移到仪表板
This commit is contained in:
parent
0a6e55247a
commit
cf55778229
@ -0,0 +1,39 @@
|
||||
package io.dataease.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChartViewCache implements Serializable {
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String title;
|
||||
|
||||
private String sceneId;
|
||||
|
||||
private String tableId;
|
||||
|
||||
private String type;
|
||||
|
||||
private String render;
|
||||
|
||||
private Integer resultCount;
|
||||
|
||||
private String resultMode;
|
||||
|
||||
private String createBy;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
||||
private String stylePriority;
|
||||
|
||||
private String chartType;
|
||||
|
||||
private Boolean isPlugin;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,35 @@
|
||||
package io.dataease.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ChartViewCacheWithBLOBs extends ChartViewCache implements Serializable {
|
||||
private String xAxis;
|
||||
|
||||
private String xAxisExt;
|
||||
|
||||
private String yAxis;
|
||||
|
||||
private String yAxisExt;
|
||||
|
||||
private String extStack;
|
||||
|
||||
private String extBubble;
|
||||
|
||||
private String customAttr;
|
||||
|
||||
private String customStyle;
|
||||
|
||||
private String customFilter;
|
||||
|
||||
private String drillFields;
|
||||
|
||||
private String snapshot;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package io.dataease.base.mapper;
|
||||
|
||||
import io.dataease.base.domain.ChartViewCache;
|
||||
import io.dataease.base.domain.ChartViewCacheExample;
|
||||
import io.dataease.base.domain.ChartViewCacheWithBLOBs;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface ChartViewCacheMapper {
|
||||
long countByExample(ChartViewCacheExample example);
|
||||
|
||||
int deleteByExample(ChartViewCacheExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(ChartViewCacheWithBLOBs record);
|
||||
|
||||
int insertSelective(ChartViewCacheWithBLOBs record);
|
||||
|
||||
List<ChartViewCacheWithBLOBs> selectByExampleWithBLOBs(ChartViewCacheExample example);
|
||||
|
||||
List<ChartViewCache> selectByExample(ChartViewCacheExample example);
|
||||
|
||||
ChartViewCacheWithBLOBs selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") ChartViewCacheWithBLOBs record, @Param("example") ChartViewCacheExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") ChartViewCacheWithBLOBs record, @Param("example") ChartViewCacheExample example);
|
||||
|
||||
int updateByExample(@Param("record") ChartViewCache record, @Param("example") ChartViewCacheExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(ChartViewCacheWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(ChartViewCacheWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKey(ChartViewCache record);
|
||||
}
|
@ -0,0 +1,604 @@
|
||||
<?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.ChartViewCacheMapper">
|
||||
<resultMap id="BaseResultMap" type="io.dataease.base.domain.ChartViewCache">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||
<result column="scene_id" jdbcType="VARCHAR" property="sceneId" />
|
||||
<result column="table_id" jdbcType="VARCHAR" property="tableId" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="render" jdbcType="VARCHAR" property="render" />
|
||||
<result column="result_count" jdbcType="INTEGER" property="resultCount" />
|
||||
<result column="result_mode" jdbcType="VARCHAR" property="resultMode" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="style_priority" jdbcType="VARCHAR" property="stylePriority" />
|
||||
<result column="chart_type" jdbcType="VARCHAR" property="chartType" />
|
||||
<result column="is_plugin" jdbcType="BIT" property="isPlugin" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.dataease.base.domain.ChartViewCacheWithBLOBs">
|
||||
<result column="x_axis" jdbcType="LONGVARCHAR" property="xAxis" />
|
||||
<result column="x_axis_ext" jdbcType="LONGVARCHAR" property="xAxisExt" />
|
||||
<result column="y_axis" jdbcType="LONGVARCHAR" property="yAxis" />
|
||||
<result column="y_axis_ext" jdbcType="LONGVARCHAR" property="yAxisExt" />
|
||||
<result column="ext_stack" jdbcType="LONGVARCHAR" property="extStack" />
|
||||
<result column="ext_bubble" jdbcType="LONGVARCHAR" property="extBubble" />
|
||||
<result column="custom_attr" jdbcType="LONGVARCHAR" property="customAttr" />
|
||||
<result column="custom_style" jdbcType="LONGVARCHAR" property="customStyle" />
|
||||
<result column="custom_filter" jdbcType="LONGVARCHAR" property="customFilter" />
|
||||
<result column="drill_fields" jdbcType="LONGVARCHAR" property="drillFields" />
|
||||
<result column="snapshot" jdbcType="LONGVARCHAR" property="snapshot" />
|
||||
</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">
|
||||
id, `name`, title, scene_id, table_id, `type`, render, result_count, result_mode,
|
||||
create_by, create_time, update_time, style_priority, chart_type, is_plugin
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
x_axis, x_axis_ext, y_axis, y_axis_ext, ext_stack, ext_bubble, custom_attr, custom_style,
|
||||
custom_filter, drill_fields, snapshot
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.dataease.base.domain.ChartViewCacheExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from chart_view_cache
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.dataease.base.domain.ChartViewCacheExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from chart_view_cache
|
||||
<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="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from chart_view_cache
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from chart_view_cache
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.dataease.base.domain.ChartViewCacheExample">
|
||||
delete from chart_view_cache
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.dataease.base.domain.ChartViewCacheWithBLOBs">
|
||||
insert into chart_view_cache (id, `name`, title,
|
||||
scene_id, table_id, `type`,
|
||||
render, result_count, result_mode,
|
||||
create_by, create_time, update_time,
|
||||
style_priority, chart_type, is_plugin,
|
||||
x_axis, x_axis_ext, y_axis,
|
||||
y_axis_ext, ext_stack, ext_bubble,
|
||||
custom_attr, custom_style, custom_filter,
|
||||
drill_fields, snapshot)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
|
||||
#{sceneId,jdbcType=VARCHAR}, #{tableId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{render,jdbcType=VARCHAR}, #{resultCount,jdbcType=INTEGER}, #{resultMode,jdbcType=VARCHAR},
|
||||
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{stylePriority,jdbcType=VARCHAR}, #{chartType,jdbcType=VARCHAR}, #{isPlugin,jdbcType=BIT},
|
||||
#{xAxis,jdbcType=LONGVARCHAR}, #{xAxisExt,jdbcType=LONGVARCHAR}, #{yAxis,jdbcType=LONGVARCHAR},
|
||||
#{yAxisExt,jdbcType=LONGVARCHAR}, #{extStack,jdbcType=LONGVARCHAR}, #{extBubble,jdbcType=LONGVARCHAR},
|
||||
#{customAttr,jdbcType=LONGVARCHAR}, #{customStyle,jdbcType=LONGVARCHAR}, #{customFilter,jdbcType=LONGVARCHAR},
|
||||
#{drillFields,jdbcType=LONGVARCHAR}, #{snapshot,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.dataease.base.domain.ChartViewCacheWithBLOBs">
|
||||
insert into chart_view_cache
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="title != null">
|
||||
title,
|
||||
</if>
|
||||
<if test="sceneId != null">
|
||||
scene_id,
|
||||
</if>
|
||||
<if test="tableId != null">
|
||||
table_id,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="render != null">
|
||||
render,
|
||||
</if>
|
||||
<if test="resultCount != null">
|
||||
result_count,
|
||||
</if>
|
||||
<if test="resultMode != null">
|
||||
result_mode,
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="stylePriority != null">
|
||||
style_priority,
|
||||
</if>
|
||||
<if test="chartType != null">
|
||||
chart_type,
|
||||
</if>
|
||||
<if test="isPlugin != null">
|
||||
is_plugin,
|
||||
</if>
|
||||
<if test="xAxis != null">
|
||||
x_axis,
|
||||
</if>
|
||||
<if test="xAxisExt != null">
|
||||
x_axis_ext,
|
||||
</if>
|
||||
<if test="yAxis != null">
|
||||
y_axis,
|
||||
</if>
|
||||
<if test="yAxisExt != null">
|
||||
y_axis_ext,
|
||||
</if>
|
||||
<if test="extStack != null">
|
||||
ext_stack,
|
||||
</if>
|
||||
<if test="extBubble != null">
|
||||
ext_bubble,
|
||||
</if>
|
||||
<if test="customAttr != null">
|
||||
custom_attr,
|
||||
</if>
|
||||
<if test="customStyle != null">
|
||||
custom_style,
|
||||
</if>
|
||||
<if test="customFilter != null">
|
||||
custom_filter,
|
||||
</if>
|
||||
<if test="drillFields != null">
|
||||
drill_fields,
|
||||
</if>
|
||||
<if test="snapshot != null">
|
||||
snapshot,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="title != null">
|
||||
#{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sceneId != null">
|
||||
#{sceneId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tableId != null">
|
||||
#{tableId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="render != null">
|
||||
#{render,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resultCount != null">
|
||||
#{resultCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resultMode != null">
|
||||
#{resultMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="stylePriority != null">
|
||||
#{stylePriority,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="chartType != null">
|
||||
#{chartType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isPlugin != null">
|
||||
#{isPlugin,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="xAxis != null">
|
||||
#{xAxis,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="xAxisExt != null">
|
||||
#{xAxisExt,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="yAxis != null">
|
||||
#{yAxis,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="yAxisExt != null">
|
||||
#{yAxisExt,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="extStack != null">
|
||||
#{extStack,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="extBubble != null">
|
||||
#{extBubble,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="customAttr != null">
|
||||
#{customAttr,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="customStyle != null">
|
||||
#{customStyle,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="customFilter != null">
|
||||
#{customFilter,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="drillFields != null">
|
||||
#{drillFields,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="snapshot != null">
|
||||
#{snapshot,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.dataease.base.domain.ChartViewCacheExample" resultType="java.lang.Long">
|
||||
select count(*) from chart_view_cache
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update chart_view_cache
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.title != null">
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.sceneId != null">
|
||||
scene_id = #{record.sceneId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tableId != null">
|
||||
table_id = #{record.tableId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.render != null">
|
||||
render = #{record.render,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.resultCount != null">
|
||||
result_count = #{record.resultCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.resultMode != null">
|
||||
result_mode = #{record.resultMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createBy != null">
|
||||
create_by = #{record.createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.stylePriority != null">
|
||||
style_priority = #{record.stylePriority,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.chartType != null">
|
||||
chart_type = #{record.chartType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.isPlugin != null">
|
||||
is_plugin = #{record.isPlugin,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.xAxis != null">
|
||||
x_axis = #{record.xAxis,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.xAxisExt != null">
|
||||
x_axis_ext = #{record.xAxisExt,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.yAxis != null">
|
||||
y_axis = #{record.yAxis,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.yAxisExt != null">
|
||||
y_axis_ext = #{record.yAxisExt,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.extStack != null">
|
||||
ext_stack = #{record.extStack,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.extBubble != null">
|
||||
ext_bubble = #{record.extBubble,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.customAttr != null">
|
||||
custom_attr = #{record.customAttr,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.customStyle != null">
|
||||
custom_style = #{record.customStyle,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.customFilter != null">
|
||||
custom_filter = #{record.customFilter,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.drillFields != null">
|
||||
drill_fields = #{record.drillFields,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.snapshot != null">
|
||||
snapshot = #{record.snapshot,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update chart_view_cache
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
scene_id = #{record.sceneId,jdbcType=VARCHAR},
|
||||
table_id = #{record.tableId,jdbcType=VARCHAR},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
render = #{record.render,jdbcType=VARCHAR},
|
||||
result_count = #{record.resultCount,jdbcType=INTEGER},
|
||||
result_mode = #{record.resultMode,jdbcType=VARCHAR},
|
||||
create_by = #{record.createBy,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
style_priority = #{record.stylePriority,jdbcType=VARCHAR},
|
||||
chart_type = #{record.chartType,jdbcType=VARCHAR},
|
||||
is_plugin = #{record.isPlugin,jdbcType=BIT},
|
||||
x_axis = #{record.xAxis,jdbcType=LONGVARCHAR},
|
||||
x_axis_ext = #{record.xAxisExt,jdbcType=LONGVARCHAR},
|
||||
y_axis = #{record.yAxis,jdbcType=LONGVARCHAR},
|
||||
y_axis_ext = #{record.yAxisExt,jdbcType=LONGVARCHAR},
|
||||
ext_stack = #{record.extStack,jdbcType=LONGVARCHAR},
|
||||
ext_bubble = #{record.extBubble,jdbcType=LONGVARCHAR},
|
||||
custom_attr = #{record.customAttr,jdbcType=LONGVARCHAR},
|
||||
custom_style = #{record.customStyle,jdbcType=LONGVARCHAR},
|
||||
custom_filter = #{record.customFilter,jdbcType=LONGVARCHAR},
|
||||
drill_fields = #{record.drillFields,jdbcType=LONGVARCHAR},
|
||||
snapshot = #{record.snapshot,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update chart_view_cache
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
scene_id = #{record.sceneId,jdbcType=VARCHAR},
|
||||
table_id = #{record.tableId,jdbcType=VARCHAR},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
render = #{record.render,jdbcType=VARCHAR},
|
||||
result_count = #{record.resultCount,jdbcType=INTEGER},
|
||||
result_mode = #{record.resultMode,jdbcType=VARCHAR},
|
||||
create_by = #{record.createBy,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
style_priority = #{record.stylePriority,jdbcType=VARCHAR},
|
||||
chart_type = #{record.chartType,jdbcType=VARCHAR},
|
||||
is_plugin = #{record.isPlugin,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.ChartViewCacheWithBLOBs">
|
||||
update chart_view_cache
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="title != null">
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sceneId != null">
|
||||
scene_id = #{sceneId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tableId != null">
|
||||
table_id = #{tableId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="render != null">
|
||||
render = #{render,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resultCount != null">
|
||||
result_count = #{resultCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resultMode != null">
|
||||
result_mode = #{resultMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="stylePriority != null">
|
||||
style_priority = #{stylePriority,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="chartType != null">
|
||||
chart_type = #{chartType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isPlugin != null">
|
||||
is_plugin = #{isPlugin,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="xAxis != null">
|
||||
x_axis = #{xAxis,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="xAxisExt != null">
|
||||
x_axis_ext = #{xAxisExt,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="yAxis != null">
|
||||
y_axis = #{yAxis,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="yAxisExt != null">
|
||||
y_axis_ext = #{yAxisExt,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="extStack != null">
|
||||
ext_stack = #{extStack,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="extBubble != null">
|
||||
ext_bubble = #{extBubble,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="customAttr != null">
|
||||
custom_attr = #{customAttr,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="customStyle != null">
|
||||
custom_style = #{customStyle,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="customFilter != null">
|
||||
custom_filter = #{customFilter,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="drillFields != null">
|
||||
drill_fields = #{drillFields,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="snapshot != null">
|
||||
snapshot = #{snapshot,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.dataease.base.domain.ChartViewCacheWithBLOBs">
|
||||
update chart_view_cache
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
scene_id = #{sceneId,jdbcType=VARCHAR},
|
||||
table_id = #{tableId,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
render = #{render,jdbcType=VARCHAR},
|
||||
result_count = #{resultCount,jdbcType=INTEGER},
|
||||
result_mode = #{resultMode,jdbcType=VARCHAR},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
style_priority = #{stylePriority,jdbcType=VARCHAR},
|
||||
chart_type = #{chartType,jdbcType=VARCHAR},
|
||||
is_plugin = #{isPlugin,jdbcType=BIT},
|
||||
x_axis = #{xAxis,jdbcType=LONGVARCHAR},
|
||||
x_axis_ext = #{xAxisExt,jdbcType=LONGVARCHAR},
|
||||
y_axis = #{yAxis,jdbcType=LONGVARCHAR},
|
||||
y_axis_ext = #{yAxisExt,jdbcType=LONGVARCHAR},
|
||||
ext_stack = #{extStack,jdbcType=LONGVARCHAR},
|
||||
ext_bubble = #{extBubble,jdbcType=LONGVARCHAR},
|
||||
custom_attr = #{customAttr,jdbcType=LONGVARCHAR},
|
||||
custom_style = #{customStyle,jdbcType=LONGVARCHAR},
|
||||
custom_filter = #{customFilter,jdbcType=LONGVARCHAR},
|
||||
drill_fields = #{drillFields,jdbcType=LONGVARCHAR},
|
||||
snapshot = #{snapshot,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.ChartViewCache">
|
||||
update chart_view_cache
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
scene_id = #{sceneId,jdbcType=VARCHAR},
|
||||
table_id = #{tableId,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
render = #{render,jdbcType=VARCHAR},
|
||||
result_count = #{resultCount,jdbcType=INTEGER},
|
||||
result_mode = #{resultMode,jdbcType=VARCHAR},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
style_priority = #{stylePriority,jdbcType=VARCHAR},
|
||||
chart_type = #{chartType,jdbcType=VARCHAR},
|
||||
is_plugin = #{isPlugin,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
public interface ExtChartViewMapper {
|
||||
List<ChartViewDTO> search(ChartViewRequest request);
|
||||
|
||||
ChartViewDTO searchOne(ChartViewRequest request);
|
||||
// ChartViewDTO searchOne(ChartViewRequest request);
|
||||
|
||||
void chartCopy(@Param("newChartId")String newChartId,@Param("oldChartId")String oldChartId,@Param("panelId")String panelId);
|
||||
|
||||
@ -25,9 +25,24 @@ public interface ExtChartViewMapper {
|
||||
|
||||
ChartViewDTO searchOneWithPrivileges(@Param("userId") String userId,@Param("id") String id );
|
||||
|
||||
ChartViewDTO searchOne(@Param("id") String id );
|
||||
|
||||
void chartCopyWithPanel(@Param("copyId") String copyId);
|
||||
|
||||
void deleteCircleView(@Param("pid") String pid);
|
||||
|
||||
void deleteCircleGroup(@Param("pid") String pid);
|
||||
|
||||
List<ChartViewDTO> searchViewsWithPanelId(@Param("panelId") String panelId);
|
||||
|
||||
ChartViewDTO searchOneFromCache(@Param("id") String id );
|
||||
|
||||
void copyToCache(@Param("id") String id );
|
||||
|
||||
void deleteCacheWithPanel(@Param("panelId") String panelId );
|
||||
|
||||
void deleteViewCache(@Param("viewId") String viewId );
|
||||
|
||||
void copyCacheToView(@Param("viewIds") List<String> viewIds );
|
||||
|
||||
}
|
||||
|
@ -16,22 +16,38 @@
|
||||
|
||||
<select id="searchOne" resultMap="BaseResultMapDTO">
|
||||
select
|
||||
id, `name`, scene_id, table_id, `type`, title, create_by, create_time, update_time,
|
||||
style_priority,x_axis, y_axis, custom_attr, custom_style, custom_filter, snapshot
|
||||
from chart_view
|
||||
<where>
|
||||
<if test="sceneId != null">
|
||||
and scene_id = #{sceneId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
and id = #{id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
<if test="sort != null">
|
||||
order by ${sort}
|
||||
</if>
|
||||
chart_view.*
|
||||
from chart_view where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="searchOneFromCache" resultMap="BaseResultMapDTO">
|
||||
select
|
||||
chart_view_cache.*
|
||||
from chart_view_cache where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="copyToCache">
|
||||
Insert into chart_view_cache select * from chart_view where chart_view.id = #{id}
|
||||
</insert>
|
||||
|
||||
<!-- <select id="searchOne" resultMap="BaseResultMapDTO">-->
|
||||
<!-- select-->
|
||||
<!-- id, `name`, scene_id, table_id, `type`, title, create_by, create_time, update_time,-->
|
||||
<!-- style_priority,x_axis, y_axis, custom_attr, custom_style, custom_filter, snapshot-->
|
||||
<!-- from chart_view-->
|
||||
<!-- <where>-->
|
||||
<!-- <if test="sceneId != null">-->
|
||||
<!-- and scene_id = #{sceneId,jdbcType=VARCHAR}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="id != null">-->
|
||||
<!-- and id = #{id,jdbcType=VARCHAR}-->
|
||||
<!-- </if>-->
|
||||
<!-- </where>-->
|
||||
<!-- <if test="sort != null">-->
|
||||
<!-- order by ${sort}-->
|
||||
<!-- </if>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="search" resultMap="BaseResultMapDTO">
|
||||
select
|
||||
id, `name`, scene_id, table_id, `type`, title, create_by, create_time, update_time,
|
||||
@ -236,4 +252,64 @@
|
||||
<delete id="deleteCircleGroup">
|
||||
delete chart_group from (select GET_CHART_GROUP_WITH_CHILDREN(#{pid}) cids) t,chart_group where FIND_IN_SET(chart_group.id,cids)
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="searchViewsWithPanelId" resultMap="BaseResultMapDTO">
|
||||
SELECT * FROM chart_view
|
||||
WHERE
|
||||
id IN (
|
||||
SELECT
|
||||
chart_view_id
|
||||
FROM
|
||||
panel_view
|
||||
WHERE
|
||||
panel_id = #{panelId}
|
||||
)
|
||||
</select>
|
||||
|
||||
<delete id="deleteCacheWithPanel">
|
||||
DELETE cvc,
|
||||
pv
|
||||
FROM
|
||||
chart_view_cache cvc
|
||||
INNER JOIN panel_view pv ON cvc.id = pv.chart_view_id
|
||||
WHERE
|
||||
pv.panel_id = #{panelId}
|
||||
</delete>
|
||||
<delete id="deleteViewCache">
|
||||
delete from chart_view_cache where id = #{viewId}
|
||||
</delete>
|
||||
|
||||
<update id="copyCacheToView">
|
||||
UPDATE chart_view cv,
|
||||
chart_view_cache cve
|
||||
SET cv.`name` = cve.`name`,
|
||||
cv.title = cve.title,
|
||||
cv.scene_id = cve.scene_id,
|
||||
cv.table_id = cve.table_id,
|
||||
cv.`type` = cve.`type`,
|
||||
cv.render = cve.render,
|
||||
cv.result_count = cve.result_count,
|
||||
cv.result_mode = cve.result_mode,
|
||||
cv.create_by = cve.create_by,
|
||||
cv.create_time = cve.create_time,
|
||||
cv.update_time = cve.update_time,
|
||||
cv.style_priority = cve.style_priority,
|
||||
cv.chart_type = cve.chart_type,
|
||||
cv.is_plugin = cve.is_plugin,
|
||||
cv.x_axis = cve.x_axis,
|
||||
cv.x_axis_ext = cve.x_axis_ext,
|
||||
cv.y_axis = cve.y_axis,
|
||||
cv.y_axis_ext = cve.y_axis_ext,
|
||||
cv.ext_stack = cve.ext_stack,
|
||||
cv.ext_bubble = cve.ext_bubble,
|
||||
cv.custom_attr = cve.custom_attr,
|
||||
cv.custom_style = cve.custom_style,
|
||||
cv.custom_filter = cve.custom_filter,
|
||||
cv.drill_fields = cve.drill_fields,
|
||||
cv.SNAPSHOT = cve.SNAPSHOT where cve.id = cv.id and cv.id in
|
||||
<foreach collection="viewIds" item="viewId" open='(' separator=',' close=')'>
|
||||
#{viewId}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
@ -2,6 +2,7 @@ package io.dataease.base.mapper.ext;
|
||||
|
||||
import io.dataease.controller.request.dataset.DataSetTableRequest;
|
||||
import io.dataease.dto.dataset.DataSetTableDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -10,4 +11,6 @@ public interface ExtDataSetTableMapper {
|
||||
|
||||
DataSetTableDTO searchOne(DataSetTableRequest request);
|
||||
|
||||
List<DataSetTableDTO> searchDataSetTableWithPanelId(@Param("panelId") String panelId, @Param("userId") String userId);
|
||||
|
||||
}
|
||||
|
@ -100,4 +100,27 @@
|
||||
ORDER BY CONVERT(`name` using gbk)
|
||||
</select>
|
||||
|
||||
|
||||
<select id="searchDataSetTableWithPanelId" resultMap="BaseResultMapDTO">
|
||||
select
|
||||
id, `name`, scene_id, data_source_id, `type`, `mode`,`info`, create_by, create_time,
|
||||
get_auths(id,'dataset',#{userId}) as `privileges`
|
||||
from dataset_table
|
||||
where id in (
|
||||
SELECT
|
||||
table_id
|
||||
FROM
|
||||
chart_view
|
||||
WHERE
|
||||
id IN (
|
||||
SELECT
|
||||
chart_view_id
|
||||
FROM
|
||||
panel_view
|
||||
WHERE
|
||||
panel_id = #{panelId}
|
||||
)
|
||||
)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
@ -43,6 +43,10 @@ public class CommonConstants {
|
||||
|
||||
// 仪表板
|
||||
public static final String PANEL = "panel";
|
||||
|
||||
// 仪表板编辑
|
||||
public static final String PANEL_EDIT = "panel_edit";
|
||||
|
||||
}
|
||||
|
||||
//视图数据查询模式
|
||||
@ -54,4 +58,15 @@ public class CommonConstants {
|
||||
// 自定义
|
||||
public static final String CUSTOM = "custom";
|
||||
}
|
||||
|
||||
//视图数据查询来源
|
||||
public static final class VIEW_EDIT_FROM {
|
||||
|
||||
// 仪表板
|
||||
public static final String PANEL = "panel";
|
||||
|
||||
// 仪表板编辑
|
||||
public static final String CACHE = "cache";
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package io.dataease.controller.chart;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.auth.annotation.DePermission;
|
||||
import io.dataease.auth.annotation.DePermissionProxy;
|
||||
import io.dataease.base.domain.ChartViewCacheWithBLOBs;
|
||||
import io.dataease.base.domain.ChartViewWithBLOBs;
|
||||
import io.dataease.commons.constants.DePermissionType;
|
||||
import io.dataease.commons.constants.ResourceAuthLevel;
|
||||
@ -35,10 +36,17 @@ public class ChartViewController {
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE)
|
||||
@ApiOperation("保存")
|
||||
@PostMapping("/save/{panelId}")
|
||||
public ChartViewWithBLOBs save(@PathVariable String panelId, @RequestBody ChartViewWithBLOBs chartViewWithBLOBs) {
|
||||
public ChartViewDTO save(@PathVariable String panelId, @RequestBody ChartViewCacheWithBLOBs chartViewWithBLOBs) {
|
||||
return chartViewService.save(chartViewWithBLOBs);
|
||||
}
|
||||
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE)
|
||||
@ApiOperation("保存到缓存表")
|
||||
@PostMapping("/save2Cache/{panelId}")
|
||||
public void save2Cache(@PathVariable String panelId, @RequestBody ChartViewCacheWithBLOBs chartViewWithBLOBs) {
|
||||
chartViewService.save2Cache(chartViewWithBLOBs);
|
||||
}
|
||||
|
||||
@ApiIgnore
|
||||
@ApiOperation("查询")
|
||||
@PostMapping("/list")
|
||||
@ -56,8 +64,8 @@ public class ChartViewController {
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
|
||||
@ApiOperation("详细信息")
|
||||
@PostMapping("/get/{id}/{panelId}")
|
||||
public ChartViewWithBLOBs get(@PathVariable String id, @PathVariable String panelId) {
|
||||
return chartViewService.get(id);
|
||||
public ChartViewDTO get(@PathVariable String id, @PathVariable String panelId,@RequestBody ChartViewRequest viewRequest) {
|
||||
return chartViewService.getOne(id,viewRequest.getQueryFrom());
|
||||
}
|
||||
|
||||
@ApiIgnore
|
||||
@ -117,4 +125,20 @@ public class ChartViewController {
|
||||
throws Exception {
|
||||
return chartViewService.checkSameDataSet(viewIdSource, viewIdTarget);
|
||||
}
|
||||
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW)
|
||||
@ApiOperation("初始化仪表板视图缓存")
|
||||
@PostMapping("/initViewCache/{panelId}")
|
||||
public void initViewCache(@PathVariable String panelId) {
|
||||
chartViewService.initViewCache(panelId);
|
||||
}
|
||||
|
||||
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
|
||||
@ApiOperation("重置视图缓存")
|
||||
@PostMapping("/resetViewCache/{id}/{panelId}")
|
||||
public void resetViewCache(@PathVariable String id, @PathVariable String panelId) {
|
||||
chartViewService.resetViewCache(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Author: wangjiahao
|
||||
@ -92,4 +93,11 @@ public class PanelGroupController {
|
||||
return panelGroupService.queryPanelViewTree();
|
||||
}
|
||||
|
||||
@ApiOperation("仪表板组件信息")
|
||||
@GetMapping("/queryPanelComponents/{id}")
|
||||
@I18n
|
||||
public Map queryPanelComponents(@PathVariable String id){
|
||||
return panelGroupService.queryPanelComponents(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -42,4 +42,5 @@ public class ChartExtRequest {
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
private PermissionProxy proxy;
|
||||
|
||||
}
|
||||
|
@ -16,4 +16,8 @@ public class ChartViewRequest extends ChartViewWithBLOBs {
|
||||
private String sort;
|
||||
@ApiModelProperty("当前登陆用户ID")
|
||||
private String userId;
|
||||
@ApiModelProperty("编辑来源")
|
||||
private String editFrom;
|
||||
@ApiModelProperty("查询来源")
|
||||
private String queryFrom;
|
||||
}
|
||||
|
@ -2,11 +2,13 @@ package io.dataease.dto.panel;
|
||||
|
||||
import io.dataease.base.domain.PanelGroupWithBLOBs;
|
||||
import io.dataease.commons.model.ITreeBase;
|
||||
import io.dataease.dto.chart.ChartViewDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Author: wangjiahao
|
||||
@ -31,6 +33,7 @@ public class PanelGroupDTO extends PanelGroupWithBLOBs implements ITreeBase<Pane
|
||||
private String sourcePanelName;
|
||||
@ApiModelProperty("子节点")
|
||||
private List<PanelGroupDTO> children;
|
||||
|
||||
@ApiModelProperty("视图信息")
|
||||
private List<Map<String, ChartViewDTO>> viewsInfo;
|
||||
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import io.dataease.auth.api.dto.CurrentUserDto;
|
||||
import io.dataease.auth.entity.SysUserEntity;
|
||||
import io.dataease.auth.service.AuthUserService;
|
||||
import io.dataease.base.domain.*;
|
||||
import io.dataease.base.mapper.ChartViewCacheMapper;
|
||||
import io.dataease.base.mapper.ChartViewMapper;
|
||||
import io.dataease.base.mapper.ext.ExtChartGroupMapper;
|
||||
import io.dataease.base.mapper.ext.ExtChartViewMapper;
|
||||
@ -71,29 +72,55 @@ public class ChartViewService {
|
||||
private PermissionService permissionService;
|
||||
@Resource
|
||||
private AuthUserService authUserService;
|
||||
@Resource
|
||||
private ChartViewCacheMapper chartViewCacheMapper;
|
||||
|
||||
//默认使用非公平
|
||||
private ReentrantLock lock = new ReentrantLock();
|
||||
|
||||
public ChartViewWithBLOBs save(ChartViewWithBLOBs chartView) {
|
||||
checkName(chartView);
|
||||
// 直接保存统一到缓存表
|
||||
public ChartViewDTO save(ChartViewCacheWithBLOBs chartView) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
chartView.setUpdateTime(timestamp);
|
||||
if (ObjectUtils.isEmpty(chartView.getId())) {
|
||||
chartView.setId(UUID.randomUUID().toString());
|
||||
chartView.setCreateBy(AuthUtils.getUser().getUsername());
|
||||
chartView.setCreateTime(timestamp);
|
||||
chartView.setUpdateTime(timestamp);
|
||||
chartViewMapper.insertSelective(chartView);
|
||||
} else {
|
||||
chartViewMapper.updateByPrimaryKeySelective(chartView);
|
||||
}
|
||||
chartViewCacheMapper.updateByPrimaryKeySelective(chartView);
|
||||
Optional.ofNullable(chartView.getId()).ifPresent(id -> {
|
||||
CacheUtils.remove(JdbcConstants.VIEW_CACHE_KEY, id);
|
||||
});
|
||||
return getOneWithPermission(chartView.getId());
|
||||
return getOne(chartView.getId(),"panel_edit");
|
||||
}
|
||||
|
||||
|
||||
// 直接保存统一到缓存表
|
||||
public void save2Cache(ChartViewCacheWithBLOBs chartView) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
chartView.setUpdateTime(timestamp);
|
||||
chartViewCacheMapper.updateByPrimaryKeySelective(chartView);
|
||||
Optional.ofNullable(chartView.getId()).ifPresent(id -> {
|
||||
CacheUtils.remove(JdbcConstants.VIEW_CACHE_KEY, id);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// // 直接保存统一到缓存表
|
||||
// public ChartViewWithBLOBs save(ChartViewRequest chartView) {
|
||||
// checkName(chartView);
|
||||
// long timestamp = System.currentTimeMillis();
|
||||
// chartView.setUpdateTime(timestamp);
|
||||
// if (ObjectUtils.isEmpty(chartView.getId())) {
|
||||
// chartView.setId(UUID.randomUUID().toString());
|
||||
// chartView.setCreateBy(AuthUtils.getUser().getUsername());
|
||||
// chartView.setCreateTime(timestamp);
|
||||
// chartView.setUpdateTime(timestamp);
|
||||
// chartViewMapper.insertSelective(chartView);
|
||||
// } else {
|
||||
// chartViewMapper.updateByPrimaryKeySelective(chartView);
|
||||
// }
|
||||
// Optional.ofNullable(chartView.getId()).ifPresent(id -> {
|
||||
// CacheUtils.remove(JdbcConstants.VIEW_CACHE_KEY, id);
|
||||
// });
|
||||
// return getOneWithPermission(chartView.getId());
|
||||
// }
|
||||
|
||||
public List<ChartViewDTO> list(ChartViewRequest chartViewRequest) {
|
||||
chartViewRequest.setUserId(String.valueOf(AuthUtils.getUser().getUserId()));
|
||||
return extChartViewMapper.search(chartViewRequest);
|
||||
@ -178,6 +205,21 @@ public class ChartViewService {
|
||||
return extChartViewMapper.searchOneWithPrivileges(userId, id);
|
||||
}
|
||||
|
||||
public ChartViewDTO getOne(String id,String queryFrom){
|
||||
ChartViewDTO result;
|
||||
//仪表板编辑页面 从缓存表中取数据 缓存表中没有数据则进行插入
|
||||
if(CommonConstants.VIEW_QUERY_FROM.PANEL_EDIT.equals(queryFrom)){
|
||||
result= extChartViewMapper.searchOneFromCache(id);
|
||||
if(result == null){
|
||||
extChartViewMapper.copyToCache(id);
|
||||
result = extChartViewMapper.searchOneFromCache(id);
|
||||
}
|
||||
}else{
|
||||
result = extChartViewMapper.searchOne(id);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public void delete(String id) {
|
||||
chartViewMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
@ -189,7 +231,7 @@ public class ChartViewService {
|
||||
}
|
||||
|
||||
public ChartViewDTO getData(String id, ChartExtRequest request) throws Exception {
|
||||
ChartViewDTO view = this.getOneWithPermission(id);
|
||||
ChartViewDTO view = this.getOne(id,request.getQueryFrom());
|
||||
// 如果是从仪表板获取视图数据,则仪表板的查询模式,查询结果的数量,覆盖视图对应的属性
|
||||
if (CommonConstants.VIEW_QUERY_FROM.PANEL.equals(request.getQueryFrom()) && CommonConstants.VIEW_RESULT_MODE.CUSTOM.equals(request.getResultMode())) {
|
||||
view.setResultMode(request.getResultMode());
|
||||
@ -1712,4 +1754,13 @@ public class ChartViewService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void initViewCache(String panelId){
|
||||
extChartViewMapper.deleteCacheWithPanel(panelId);
|
||||
}
|
||||
|
||||
public void resetViewCache (String viewId){
|
||||
extChartViewMapper.deleteViewCache(viewId);
|
||||
extChartViewMapper.copyToCache(viewId);
|
||||
}
|
||||
}
|
||||
|
@ -14,14 +14,17 @@ import io.dataease.commons.utils.AuthUtils;
|
||||
import io.dataease.commons.utils.LogUtil;
|
||||
import io.dataease.commons.utils.TreeUtils;
|
||||
import io.dataease.controller.request.authModel.VAuthModelRequest;
|
||||
import io.dataease.controller.request.dataset.DataSetTableRequest;
|
||||
import io.dataease.controller.request.panel.PanelGroupRequest;
|
||||
import io.dataease.dto.authModel.VAuthModelDTO;
|
||||
import io.dataease.dto.chart.ChartViewDTO;
|
||||
import io.dataease.dto.dataset.DataSetTableDTO;
|
||||
import io.dataease.dto.panel.PanelGroupDTO;
|
||||
import io.dataease.dto.panel.linkJump.PanelLinkJumpBaseRequest;
|
||||
import io.dataease.exception.DataEaseException;
|
||||
import io.dataease.i18n.Translator;
|
||||
import io.dataease.service.chart.ChartViewService;
|
||||
import io.dataease.service.dataset.DataSetTableService;
|
||||
import io.dataease.service.sys.SysAuthService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -33,10 +36,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -81,6 +81,11 @@ public class PanelGroupService {
|
||||
private ExtPanelViewLinkageMapper extPanelViewLinkageMapper;
|
||||
@Resource
|
||||
private ExtChartViewMapper extChartViewMapper;
|
||||
@Resource
|
||||
private ExtDataSetTableMapper extDataSetTableMapper;
|
||||
@Resource
|
||||
private DataSetTableService dataSetTableService;
|
||||
|
||||
|
||||
public List<PanelGroupDTO> tree(PanelGroupRequest panelGroupRequest) {
|
||||
String userId = String.valueOf(AuthUtils.getUser().getUserId());
|
||||
@ -99,13 +104,8 @@ public class PanelGroupService {
|
||||
@DeCleaner(DePermissionType.PANEL)
|
||||
// @Transactional
|
||||
public PanelGroup saveOrUpdate(PanelGroupRequest request) {
|
||||
try {
|
||||
Boolean mobileLayout = panelViewService.syncPanelViews(request);
|
||||
request.setMobileLayout(mobileLayout);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
LOGGER.error("更新panelView出错panelId:{}", request.getId());
|
||||
}
|
||||
Boolean mobileLayout = panelViewService.syncPanelViews(request);
|
||||
request.setMobileLayout(mobileLayout);
|
||||
String panelId = request.getId();
|
||||
if (StringUtils.isEmpty(panelId)) {
|
||||
// 新建
|
||||
@ -341,4 +341,42 @@ public class PanelGroupService {
|
||||
LogUtil.info("=====v1.8版本 仪表板私有化【结束】=====");
|
||||
}
|
||||
|
||||
// 获取仪表板的视图信息
|
||||
public Map queryPanelComponents(String panelId) {
|
||||
try {
|
||||
Map result, tableWithFields, viewWithViewInfo, tableWithTableInfo;
|
||||
//查找所有view
|
||||
List<ChartViewDTO> views = extChartViewMapper.searchViewsWithPanelId(panelId);
|
||||
viewWithViewInfo = views.stream().collect(Collectors.toMap(ChartViewDTO::getId, ChartViewDTO -> ChartViewDTO));
|
||||
//查找所有dataset
|
||||
List<DataSetTableDTO> tables = extDataSetTableMapper.searchDataSetTableWithPanelId(panelId, String.valueOf(AuthUtils.getUser().getUserId()));
|
||||
tableWithTableInfo = tables.stream().collect(Collectors.toMap(DataSetTableDTO::getId, DataSetTableDTO -> DataSetTableDTO));
|
||||
//查找所有datasetFields
|
||||
tableWithFields = new HashMap();
|
||||
if (CollectionUtils.isNotEmpty(tables)) {
|
||||
for (DataSetTableDTO table : tables) {
|
||||
DataSetTableRequest dataSetTableRequest = new DataSetTableRequest();
|
||||
dataSetTableRequest.setId(table.getId());
|
||||
Map<String, List<DatasetTableField>> tableDataSetFields = dataSetTableService.getFieldsFromDE(dataSetTableRequest);
|
||||
tableWithFields.put(table.getId(), tableDataSetFields);
|
||||
}
|
||||
}
|
||||
|
||||
result = new HashMap();
|
||||
result.put("tableWithFields", tableWithFields);
|
||||
result.put("viewWithViewInfo", viewWithViewInfo);
|
||||
result.put("tableWithTableInfo", tableWithTableInfo);
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
LogUtil.error(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void findPanelAttachInfo(String panelId) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import io.dataease.base.domain.PanelGroupWithBLOBs;
|
||||
import io.dataease.base.domain.PanelView;
|
||||
import io.dataease.base.domain.PanelViewExample;
|
||||
import io.dataease.base.mapper.PanelViewMapper;
|
||||
import io.dataease.base.mapper.ext.ExtChartViewMapper;
|
||||
import io.dataease.base.mapper.ext.ExtPanelViewMapper;
|
||||
import io.dataease.commons.utils.AuthUtils;
|
||||
import io.dataease.commons.utils.BeanUtils;
|
||||
@ -39,6 +40,9 @@ public class PanelViewService {
|
||||
@Resource
|
||||
private PanelViewMapper panelViewMapper;
|
||||
|
||||
@Resource
|
||||
private ExtChartViewMapper extChartViewMapper;
|
||||
|
||||
private final static String SCENE_TYPE = "scene";
|
||||
|
||||
public List<PanelViewDto> groups() {
|
||||
@ -115,6 +119,10 @@ public class PanelViewService {
|
||||
extPanelViewMapper.deleteWithPanelId(panelId);
|
||||
if (CollectionUtils.isNotEmpty(panelViewInsertDTOList)) {
|
||||
extPanelViewMapper.savePanelView(panelViewInsertDTOList);
|
||||
//将视图从cache表中更新到正式表中
|
||||
List<String> viewIds = panelViewInsertDTOList.stream().map(panelView ->panelView.getChartViewId()).collect(Collectors.toList());
|
||||
extChartViewMapper.copyCacheToView(viewIds);
|
||||
extChartViewMapper.deleteCacheWithPanel(panelId);
|
||||
}
|
||||
}
|
||||
return mobileLayout;
|
||||
|
@ -60,7 +60,7 @@
|
||||
</javaClientGenerator>
|
||||
|
||||
<!--要生成的数据库表 -->
|
||||
<table tableName="dataease_code_version"/>
|
||||
<table tableName="chart_view_cache"/>
|
||||
<!-- <table tableName="chart_view"/>-->
|
||||
<!-- <table tableName="panel_view"/>-->
|
||||
<!-- <table tableName="panel_link_jump"/>-->
|
||||
|
@ -1,10 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
import store from '@/store'
|
||||
import { queryPanelComponents } from '@/api/panel/panel'
|
||||
|
||||
export function post(url, data) {
|
||||
return request({
|
||||
url: url,
|
||||
method: 'post',
|
||||
loading: true,
|
||||
loading: false,
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -13,7 +15,7 @@ export function getChartTree(data) {
|
||||
return request({
|
||||
url: 'api',
|
||||
method: 'post',
|
||||
loading: true,
|
||||
loading: false,
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -38,7 +40,7 @@ export function searchAdviceSceneId(panelId) {
|
||||
return request({
|
||||
url: '/chart/view/searchAdviceSceneId/' + panelId,
|
||||
method: 'get',
|
||||
loading: true
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
|
||||
@ -54,7 +56,7 @@ export function ajaxGetDataOnly(id, panelId, data) {
|
||||
return request({
|
||||
url: '/chart/view/getData/' + id + '/' + panelId,
|
||||
method: 'post',
|
||||
loading: true,
|
||||
loading: false,
|
||||
hideMsg: true,
|
||||
data
|
||||
})
|
||||
@ -75,3 +77,34 @@ export function deleteCircle(id) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getChartDetails(id, panelId, data) {
|
||||
return request({
|
||||
url: '/chart/view/get/' + id + '/' + panelId,
|
||||
method: 'post',
|
||||
loading: false,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function save2Cache(panelId, data) {
|
||||
return request({
|
||||
url: '/chart/view/save2Cache/' + panelId,
|
||||
method: 'post',
|
||||
loading: false,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function resetViewCacheCallBack(viewId, panelId, callback) {
|
||||
// 加载仪表板组件视图数据
|
||||
resetViewCache(viewId, panelId).then(rep => {
|
||||
callback(rep)
|
||||
})
|
||||
}
|
||||
export function resetViewCache(viewId, panelId) {
|
||||
return request({
|
||||
url: '/chart/view/resetViewCache/' + viewId + '/' + panelId,
|
||||
method: 'post',
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
|
@ -164,3 +164,28 @@ export function queryPanelViewTree() {
|
||||
})
|
||||
}
|
||||
|
||||
export function initPanelComponentsData(panelId, callback) {
|
||||
// 加载仪表板组件视图数据
|
||||
queryPanelComponents(panelId).then(rep => {
|
||||
store.commit('initPanelComponents', rep.data)
|
||||
callback(rep)
|
||||
})
|
||||
}
|
||||
|
||||
export function queryPanelComponents(id) {
|
||||
return request({
|
||||
url: 'panel/group/queryPanelComponents/' + id,
|
||||
method: 'get',
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
|
||||
export function initViewCache(panelId) {
|
||||
// 初始化仪表板视图缓存
|
||||
return request({
|
||||
url: 'chart/view/initViewCache/' + panelId,
|
||||
method: 'post',
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -531,7 +531,7 @@ export default {
|
||||
width: this.computedMainSlotWidth,
|
||||
height: this.computedMainSlotHeight
|
||||
}
|
||||
if (this.element.commonBackground && this.element.commonBackground.enable) {
|
||||
if (this.element.commonBackground&&this.element.commonBackground.enable) {
|
||||
if (this.element.commonBackground.backgroundType === 'innerImage') {
|
||||
style['background'] = `url(${this.element.commonBackground.innerImage}) no-repeat`
|
||||
} else if (this.element.commonBackground.backgroundType === 'outerImage') {
|
||||
|
@ -184,22 +184,25 @@ export default {
|
||||
// resize
|
||||
this.$emit('resizeView')
|
||||
},
|
||||
// edit() {
|
||||
// // 编辑时临时保存 当前修改的画布
|
||||
// this.$store.dispatch('panel/setComponentDataTemp', JSON.stringify(this.componentData))
|
||||
// this.$store.dispatch('panel/setCanvasStyleDataTemp', JSON.stringify(this.canvasStyleData))
|
||||
// if (this.curComponent.type === 'view') {
|
||||
// this.$store.dispatch('chart/setViewId', null)
|
||||
// this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId)
|
||||
// bus.$emit('PanelSwitchComponent', { name: 'ChartEdit', param: { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' }})
|
||||
// }
|
||||
// if (this.curComponent.type === 'custom') {
|
||||
// bus.$emit('component-dialog-edit')
|
||||
// }
|
||||
// // 编辑样式组件
|
||||
// if (this.curComponent.type === 'v-text' || this.curComponent.type === 'rect-shape') {
|
||||
// bus.$emit('component-dialog-style')
|
||||
// }
|
||||
// },
|
||||
edit() {
|
||||
// 编辑时临时保存 当前修改的画布
|
||||
this.$store.dispatch('panel/setComponentDataTemp', JSON.stringify(this.componentData))
|
||||
this.$store.dispatch('panel/setCanvasStyleDataTemp', JSON.stringify(this.canvasStyleData))
|
||||
if (this.curComponent.type === 'view') {
|
||||
this.$store.dispatch('chart/setViewId', null)
|
||||
this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId)
|
||||
bus.$emit('PanelSwitchComponent', { name: 'ChartEdit', param: { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' }})
|
||||
}
|
||||
if (this.curComponent.type === 'custom') {
|
||||
bus.$emit('component-dialog-edit')
|
||||
}
|
||||
// 编辑样式组件
|
||||
if (this.curComponent.type === 'v-text' || this.curComponent.type === 'rect-shape') {
|
||||
bus.$emit('component-dialog-style')
|
||||
}
|
||||
bus.$emit('change_panel_right_draw', true)
|
||||
},
|
||||
linkageEdit() {
|
||||
|
||||
|
@ -46,23 +46,24 @@ export default {
|
||||
]),
|
||||
methods: {
|
||||
edit() {
|
||||
// 编辑时临时保存 当前修改的画布
|
||||
this.$store.dispatch('panel/setComponentDataTemp', JSON.stringify(this.componentData))
|
||||
this.$store.dispatch('panel/setCanvasStyleDataTemp', JSON.stringify(this.canvasStyleData))
|
||||
if (this.curComponent.type === 'view') {
|
||||
this.$store.dispatch('chart/setViewId', null)
|
||||
this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId)
|
||||
bus.$emit('PanelSwitchComponent', { name: 'ChartEdit', param: { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' }})
|
||||
}
|
||||
if (this.curComponent.type === 'custom') {
|
||||
bus.$emit('component-dialog-edit')
|
||||
}
|
||||
|
||||
// 编辑样式组件
|
||||
|
||||
if (this.curComponent.type === 'v-text' || this.curComponent.type === 'rect-shape') {
|
||||
bus.$emit('component-dialog-style')
|
||||
}
|
||||
bus.$emit('change_panel_right_draw', true)
|
||||
// // 编辑时临时保存 当前修改的画布
|
||||
// this.$store.dispatch('panel/setComponentDataTemp', JSON.stringify(this.componentData))
|
||||
// this.$store.dispatch('panel/setCanvasStyleDataTemp', JSON.stringify(this.canvasStyleData))
|
||||
// if (this.curComponent.type === 'view') {
|
||||
// this.$store.dispatch('chart/setViewId', null)
|
||||
// this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId)
|
||||
// bus.$emit('PanelSwitchComponent', { name: 'ChartEdit', param: { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' }})
|
||||
// }
|
||||
// if (this.curComponent.type === 'custom') {
|
||||
// bus.$emit('component-dialog-edit')
|
||||
// }
|
||||
//
|
||||
// // 编辑样式组件
|
||||
//
|
||||
// if (this.curComponent.type === 'v-text' || this.curComponent.type === 'rect-shape') {
|
||||
// bus.$emit('component-dialog-style')
|
||||
// }
|
||||
},
|
||||
lock() {
|
||||
this.$store.commit('lock')
|
||||
|
@ -57,6 +57,7 @@
|
||||
@linkJumpSet="linkJumpSet(item)"
|
||||
@boardSet="boardSet(item)"
|
||||
@canvasDragging="canvasDragging"
|
||||
@editComponent="editComponent(index,item)"
|
||||
>
|
||||
<component
|
||||
:is="item.component"
|
||||
@ -1286,6 +1287,11 @@ export default {
|
||||
this.$refs.wrapperChild[index].chartResize()
|
||||
}
|
||||
},
|
||||
editComponent(index, item) {
|
||||
if (item.type === 'view') {
|
||||
this.$refs.wrapperChild[index].editChart()
|
||||
}
|
||||
},
|
||||
handleDragOver(e) {
|
||||
this.dragComponentInfo.shadowStyle.x = e.pageX - 220
|
||||
this.dragComponentInfo.shadowStyle.y = e.pageY - 90 + this.scrollTop
|
||||
|
@ -372,6 +372,9 @@ export default {
|
||||
bus.$on('plugin-add-view-track-filter', param => {
|
||||
param.viewId && param.viewId === this.element.propValue.viewId && this.addViewTrackFilter(param)
|
||||
})
|
||||
bus.$on('view-in-cache', param => {
|
||||
param.viewId && param.viewId === this.element.propValue.viewId && this.getDataEdit(param)
|
||||
})
|
||||
},
|
||||
|
||||
addViewTrackFilter(linkageParam) {
|
||||
@ -431,7 +434,8 @@ export default {
|
||||
}
|
||||
const requestInfo = {
|
||||
...this.filter,
|
||||
cache: cache
|
||||
cache: cache,
|
||||
queryFrom: this.isEdit ? 'panel_edit' : 'panel'
|
||||
}
|
||||
if (this.panelInfo.proxy) {
|
||||
// method = viewInfo
|
||||
@ -711,6 +715,18 @@ export default {
|
||||
|
||||
renderComponent() {
|
||||
return this.chart.render
|
||||
},
|
||||
getDataEdit(param) {
|
||||
this.$store.state.styleChangeTimes++
|
||||
if (param.type === 'propChange') {
|
||||
this.getData(param.viewId, false)
|
||||
} else if (param.type === 'styleChange') {
|
||||
this.chart.customAttr = param.viewInfo.customAttr
|
||||
this.chart.customStyle = param.viewInfo.customStyle
|
||||
this.sourceCustomAttrStr = this.chart.customAttr
|
||||
this.sourceCustomStyleStr = this.chart.customStyle
|
||||
this.mergeScale()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1029,7 +1029,8 @@ export default {
|
||||
table_item_align: 'Body Align',
|
||||
table_align_left: 'Left',
|
||||
table_align_center: 'Center',
|
||||
table_align_right: 'Right'
|
||||
table_align_right: 'Right',
|
||||
draw_back: 'Draw Back'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',
|
||||
@ -1578,7 +1579,8 @@ export default {
|
||||
uninstall_confirm: 'Comfirm to uninstall the plugin?',
|
||||
uninstall_cancel: 'Cancel uninstall plugin',
|
||||
setting_background: 'BackGround',
|
||||
setting_jump: 'Jump Setting'
|
||||
setting_jump: 'Jump Setting',
|
||||
select_view: 'Select View'
|
||||
},
|
||||
display: {
|
||||
logo: 'Head system logo',
|
||||
|
@ -1029,7 +1029,8 @@ export default {
|
||||
table_item_align: '表格對齊方式',
|
||||
table_align_left: '左對齊',
|
||||
table_align_center: '居中',
|
||||
table_align_right: '右對齊'
|
||||
table_align_right: '右對齊',
|
||||
draw_back: '收回'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多個 Sheet 頁,默認抽取第一個',
|
||||
@ -1564,7 +1565,8 @@ export default {
|
||||
choose_background: '选择组件背景',
|
||||
choose_background_tips: '组件自有的背景设置会覆盖当前设置',
|
||||
setting_background: '设置背景',
|
||||
setting_jump: '跳转设置'
|
||||
setting_jump: '跳转设置',
|
||||
select_view: '请选择视图...'
|
||||
},
|
||||
plugin: {
|
||||
local_install: '本地安裝',
|
||||
|
@ -1032,7 +1032,8 @@ export default {
|
||||
table_item_align: '表格对齐方式',
|
||||
table_align_left: '左对齐',
|
||||
table_align_center: '居中',
|
||||
table_align_right: '右对齐'
|
||||
table_align_right: '右对齐',
|
||||
draw_back: '收回'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多个 Sheet 页,默认抽取第一个',
|
||||
@ -1573,7 +1574,8 @@ export default {
|
||||
choose_background: '选择组件背景',
|
||||
choose_background_tips: '组件自有的背景设置会覆盖当前设置',
|
||||
setting_background: '设置背景',
|
||||
setting_jump: '跳转设置'
|
||||
setting_jump: '跳转设置',
|
||||
select_view: '请选择视图...'
|
||||
},
|
||||
plugin: {
|
||||
local_install: '本地安装',
|
||||
|
@ -99,7 +99,9 @@ const data = {
|
||||
x: 300,
|
||||
y: 600
|
||||
},
|
||||
scrollAutoMove: 0
|
||||
scrollAutoMove: 0,
|
||||
// 视图是否编辑记录
|
||||
panelViewEditInfo: {}
|
||||
},
|
||||
mutations: {
|
||||
...animation.mutations,
|
||||
@ -392,6 +394,17 @@ const data = {
|
||||
},
|
||||
setScrollAutoMove(state, offset) {
|
||||
state.scrollAutoMove = offset
|
||||
},
|
||||
initPanelComponents(state, panelComponents) {
|
||||
if (panelComponents) {
|
||||
state.canvasStyleData['panelComponents'] = panelComponents
|
||||
}
|
||||
},
|
||||
recordViewEdit(state, viewInfo) {
|
||||
state.panelViewEditInfo[viewInfo.viewId] = viewInfo.hasEdit
|
||||
},
|
||||
resetViewEditInfo(state) {
|
||||
state.panelViewEditInfo = {}
|
||||
}
|
||||
},
|
||||
modules: {
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<el-row v-loading="loading" style="height: 100%;overflow-y: hidden;width: 100%;">
|
||||
<el-tooltip :content="$t('chart.draw_back')">
|
||||
<el-button class="el-icon-d-arrow-right" style="position:absolute;left: 4px;top: 5px;z-index: 1000" size="mini" circle @click="closePanelEdit" />
|
||||
</el-tooltip>
|
||||
<!-- <i class="el-icon-d-arrow-right" style="position:absolute;left: 4px;top: 11px"></i>-->
|
||||
<el-row style="height: 40px;" class="padding-lr">
|
||||
<span class="title-text" style="line-height: 40px;">{{ view.name }}</span>
|
||||
<el-popover
|
||||
placement="right-start"
|
||||
width="400"
|
||||
@ -10,25 +13,30 @@
|
||||
@hide="hideTab"
|
||||
>
|
||||
<dataset-chart-detail type="chart" :data="view" :tab-status="tabStatus" />
|
||||
<i slot="reference" class="el-icon-warning icon-class" style="margin-left: 4px;cursor: pointer;" />
|
||||
<i
|
||||
slot="reference"
|
||||
class="el-icon-warning icon-class"
|
||||
style="position:absolute; margin-left: 30px; top:14px;cursor: pointer;"
|
||||
/>
|
||||
</el-popover>
|
||||
<span class="title-text view-title-name" style="line-height: 40px;">{{ view.name }}</span>
|
||||
<span style="float: right;line-height: 40px;">
|
||||
<el-button size="mini" @click="close">
|
||||
{{ $t('chart.close') }}
|
||||
</el-button>
|
||||
<el-button size="mini" :disabled="!hasEdit" @click="reset">
|
||||
<!-- <el-button size="mini" @click="closePanelEdit">-->
|
||||
<!-- {{ $t('chart.draw_back') }}-->
|
||||
<!-- </el-button>-->
|
||||
<el-button type="warning" round size="mini" :disabled="!hasEdit" @click="reset">
|
||||
{{ $t('chart.recover') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" @click="closeEdit">
|
||||
{{ $t('commons.save') }}
|
||||
</el-button>
|
||||
<!-- <el-button size="mini" type="primary" @click="closeEdit">-->
|
||||
<!-- {{ $t('commons.save') }}-->
|
||||
<!-- </el-button>-->
|
||||
</span>
|
||||
</el-row>
|
||||
<el-row class="view-panel">
|
||||
<el-row class="view-panel-row">
|
||||
<el-tabs :stretch="true" class="tab-header">
|
||||
<el-tab-pane :label="$t('chart.chart_data')" class="padding-tab" style="width: 360px">
|
||||
<el-tab-pane :label="$t('chart.chart_data')" class="padding-tab" style="width: 300px">
|
||||
<el-row class="view-panel">
|
||||
<el-col class="theme-border-class" style="width: 180px;border-right: 1px solid #E6E6E6;">
|
||||
<el-col class="theme-border-class" :span="12" style="border-right: 1px solid #E6E6E6;">
|
||||
<div style="display: flex;align-items: center;justify-content: center;padding: 6px;">
|
||||
<el-input
|
||||
v-model="searchField"
|
||||
@ -117,7 +125,8 @@
|
||||
</el-col>
|
||||
|
||||
<el-col
|
||||
style="height: 100%;width: 180px;border-right: 1px solid #E6E6E6;"
|
||||
:span="12"
|
||||
style="height: 100%;border-right: 1px solid #E6E6E6;"
|
||||
class="theme-border-class"
|
||||
>
|
||||
<div style="height: 60px;overflow:auto" class="padding-lr theme-border-class">
|
||||
@ -218,7 +227,11 @@
|
||||
</el-row>
|
||||
</el-row>
|
||||
|
||||
<plugin-com v-if="view.isPlugin" :component-name="view.type + '-data'" :obj="{view, param, chart, dimensionData, quotaData}" />
|
||||
<plugin-com
|
||||
v-if="view.isPlugin"
|
||||
:component-name="view.type + '-data'"
|
||||
:obj="{view, param, chart, dimensionData, quotaData}"
|
||||
/>
|
||||
<div v-else>
|
||||
|
||||
<el-row v-if="view.type ==='map'" class="padding-lr">
|
||||
@ -352,7 +365,9 @@
|
||||
<span v-else-if="view.type && view.type === 'map'">{{ $t('chart.chart_data') }}</span>
|
||||
<span v-else-if="view.type && view.type.includes('tree')">{{ $t('chart.drag_block_treemap_size') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'chart-mix'">{{ $t('chart.drag_block_value_axis_main') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'liquid'">{{ $t('chart.drag_block_progress') }}</span>
|
||||
<span
|
||||
v-else-if="view.type && view.type === 'liquid'"
|
||||
>{{ $t('chart.drag_block_progress') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'word-cloud'">{{ $t('chart.drag_block_word_cloud_size') }}</span>
|
||||
/
|
||||
<span>{{ $t('chart.quota') }}</span>
|
||||
@ -462,7 +477,11 @@
|
||||
</div>
|
||||
</el-row>
|
||||
<!--extBubble-->
|
||||
<el-row v-if="view.type && view.type.includes('scatter')" class="padding-lr" style="margin-top: 6px;">
|
||||
<el-row
|
||||
v-if="view.type && view.type.includes('scatter')"
|
||||
class="padding-lr"
|
||||
style="margin-top: 6px;"
|
||||
>
|
||||
<span style="width: 80px;text-align: right;">
|
||||
<span>{{ $t('chart.bubble_size') }}</span>
|
||||
/
|
||||
@ -578,7 +597,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('chart.chart_style')" class="padding-tab" style="width: 360px;">
|
||||
<el-tab-pane :label="$t('chart.chart_style')" class="padding-tab" style="width: 300px">
|
||||
<el-row class="view-panel">
|
||||
<plugin-com
|
||||
v-if="view.isPlugin"
|
||||
@ -812,7 +831,7 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-col style="height: 100%;min-width: 500px;border-top: 1px solid #E6E6E6;">
|
||||
<el-col v-if="editFrom==='view'" style="height: 100%;min-width: 500px;border-top: 1px solid #E6E6E6;">
|
||||
<el-row style="width: 100%;height: 100%;" class="padding-lr">
|
||||
<div ref="imageWrapper" style="height: 100%">
|
||||
<plugin-com
|
||||
@ -991,7 +1010,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ajaxGetDataOnly, post } from '@/api/chart/chart'
|
||||
import {
|
||||
ajaxGetDataOnly,
|
||||
post,
|
||||
getChartDetails,
|
||||
save2Cache,
|
||||
resetViewCache,
|
||||
resetViewCacheCallBack
|
||||
} from '@/api/chart/chart'
|
||||
import DimensionItem from '../components/drag-item/DimensionItem'
|
||||
import QuotaItem from '../components/drag-item/QuotaItem'
|
||||
import FilterItem from '../components/drag-item/FilterItem'
|
||||
@ -1052,6 +1078,8 @@ import { compareItem } from '@/views/chart/chart/compare'
|
||||
import ChartComponentS2 from '@/views/chart/components/ChartComponentS2'
|
||||
import DimensionExtItem from '@/views/chart/components/drag-item/DimensionExtItem'
|
||||
import PluginCom from '@/views/system/plugin/PluginCom'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'ChartEdit',
|
||||
components: {
|
||||
@ -1102,6 +1130,11 @@ export default {
|
||||
param: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
editFrom: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'view'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -1197,7 +1230,10 @@ export default {
|
||||
},
|
||||
panelInfo() {
|
||||
return this.$store.state.panel.panelInfo
|
||||
}
|
||||
},
|
||||
...mapState([
|
||||
'panelViewEditInfo'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'param': function() {
|
||||
@ -1205,7 +1241,9 @@ export default {
|
||||
//
|
||||
} else {
|
||||
this.resetDrill()
|
||||
this.getData(this.param.id)
|
||||
this.initFromPanel()
|
||||
// this.getData(this.param.id)
|
||||
this.getChart(this.param.id)
|
||||
}
|
||||
},
|
||||
searchField(val) {
|
||||
@ -1226,13 +1264,18 @@ export default {
|
||||
mounted() {
|
||||
this.bindPluginEvent()
|
||||
// this.get(this.$store.state.chart.viewId);
|
||||
this.getData(this.param.id)
|
||||
// this.getData(this.param.id)
|
||||
// this.getChart(this.param.id)
|
||||
// this.myEcharts();
|
||||
this.initFromPanel()
|
||||
},
|
||||
activated() {
|
||||
},
|
||||
|
||||
methods: {
|
||||
initFromPanel() {
|
||||
this.hasEdit = (this.panelViewEditInfo[this.param.id] || false)
|
||||
},
|
||||
bindPluginEvent() {
|
||||
bus.$on('show-dimension-edit-filter', this.showDimensionEditFilter)
|
||||
bus.$on('show-rename', this.showRename)
|
||||
@ -1449,50 +1492,57 @@ export default {
|
||||
delete view.data
|
||||
return view
|
||||
},
|
||||
calcData(getData, trigger, needRefreshGroup = false, switchType = false) {
|
||||
this.hasEdit = true
|
||||
const view = this.buildParam(getData, trigger, needRefreshGroup, switchType)
|
||||
// calcData(getData, trigger, needRefreshGroup = false, switchType = false) {
|
||||
// this.hasEdit = true
|
||||
// const view = this.buildParam(getData, trigger, needRefreshGroup, switchType)
|
||||
// if (!view) return
|
||||
// post('/chart/view/calcData/' + this.panelInfo.id, {
|
||||
// view: view,
|
||||
// requestList: {
|
||||
// filter: [],
|
||||
// drill: this.drillClickDimensionList
|
||||
// }
|
||||
// }).then(response => {
|
||||
// const view = JSON.parse(JSON.stringify(response.data))
|
||||
// this.view.xaxis = view.xaxis ? JSON.parse(view.xaxis) : []
|
||||
// this.view.xaxisExt = view.xaxisExt ? JSON.parse(view.xaxisExt) : []
|
||||
// this.view.yaxis = view.yaxis ? JSON.parse(view.yaxis) : []
|
||||
// this.view.yaxisExt = view.yaxisExt ? JSON.parse(view.yaxisExt) : []
|
||||
// this.view.extStack = view.extStack ? JSON.parse(view.extStack) : []
|
||||
// this.view.drillFields = view.drillFields ? JSON.parse(view.drillFields) : []
|
||||
// this.view.extBubble = view.extBubble ? JSON.parse(view.extBubble) : []
|
||||
// this.view.customAttr = view.customAttr ? JSON.parse(view.customAttr) : {}
|
||||
// this.view.customStyle = view.customStyle ? JSON.parse(view.customStyle) : {}
|
||||
// this.view.customFilter = view.customFilter ? JSON.parse(view.customFilter) : {}
|
||||
// // 将视图传入echart组件
|
||||
// this.chart = response.data
|
||||
// this.data = response.data.data
|
||||
// // console.log(JSON.stringify(this.chart))
|
||||
// this.httpRequest.status = true
|
||||
// if (this.chart.privileges) {
|
||||
// this.param.privileges = this.chart.privileges
|
||||
// }
|
||||
// if (!response.data.drill) {
|
||||
// this.drillClickDimensionList.splice(this.drillClickDimensionList.length - 1, 1)
|
||||
//
|
||||
// this.resetDrill()
|
||||
// }
|
||||
// this.drill = response.data.drill
|
||||
// this.drillFilters = JSON.parse(JSON.stringify(response.data.drillFilters ? response.data.drillFilters : []))
|
||||
//
|
||||
// this.closeChangeChart()
|
||||
// })
|
||||
// },
|
||||
calcData() {
|
||||
this.changeEditStatus(true)
|
||||
const view = this.buildParam(true, 'chart', false, false)
|
||||
if (!view) return
|
||||
post('/chart/view/calcData/' + this.panelInfo.id, {
|
||||
view: view,
|
||||
requestList: {
|
||||
filter: [],
|
||||
drill: this.drillClickDimensionList
|
||||
}
|
||||
}).then(response => {
|
||||
const view = JSON.parse(JSON.stringify(response.data))
|
||||
this.view.xaxis = view.xaxis ? JSON.parse(view.xaxis) : []
|
||||
this.view.xaxisExt = view.xaxisExt ? JSON.parse(view.xaxisExt) : []
|
||||
this.view.yaxis = view.yaxis ? JSON.parse(view.yaxis) : []
|
||||
this.view.yaxisExt = view.yaxisExt ? JSON.parse(view.yaxisExt) : []
|
||||
this.view.extStack = view.extStack ? JSON.parse(view.extStack) : []
|
||||
this.view.drillFields = view.drillFields ? JSON.parse(view.drillFields) : []
|
||||
this.view.extBubble = view.extBubble ? JSON.parse(view.extBubble) : []
|
||||
this.view.customAttr = view.customAttr ? JSON.parse(view.customAttr) : {}
|
||||
this.view.customStyle = view.customStyle ? JSON.parse(view.customStyle) : {}
|
||||
this.view.customFilter = view.customFilter ? JSON.parse(view.customFilter) : {}
|
||||
// 将视图传入echart组件
|
||||
this.chart = response.data
|
||||
this.data = response.data.data
|
||||
// console.log(JSON.stringify(this.chart))
|
||||
this.httpRequest.status = true
|
||||
if (this.chart.privileges) {
|
||||
this.param.privileges = this.chart.privileges
|
||||
}
|
||||
if (!response.data.drill) {
|
||||
this.drillClickDimensionList.splice(this.drillClickDimensionList.length - 1, 1)
|
||||
|
||||
this.resetDrill()
|
||||
}
|
||||
this.drill = response.data.drill
|
||||
this.drillFilters = JSON.parse(JSON.stringify(response.data.drillFilters ? response.data.drillFilters : []))
|
||||
|
||||
this.closeChangeChart()
|
||||
save2Cache(this.panelInfo.id, view).then(() => {
|
||||
bus.$emit('view-in-cache', { type: 'propChange', viewId: this.param.id })
|
||||
})
|
||||
},
|
||||
|
||||
calcStyle() {
|
||||
this.hasEdit = true
|
||||
this.changeEditStatus(true)
|
||||
// 将视图传入echart...组件
|
||||
const view = JSON.parse(JSON.stringify(this.view))
|
||||
view.xaxis = JSON.stringify(this.view.xaxis)
|
||||
@ -1505,8 +1555,15 @@ export default {
|
||||
view.customAttr = JSON.stringify(this.view.customAttr)
|
||||
view.customStyle = JSON.stringify(this.view.customStyle)
|
||||
view.customFilter = JSON.stringify(this.view.customFilter)
|
||||
view.data = this.data
|
||||
// view.data = this.data
|
||||
this.chart = view
|
||||
|
||||
// 保存到缓存表
|
||||
const viewSave = this.buildParam(true, 'chart', false, false)
|
||||
if (!viewSave) return
|
||||
save2Cache(this.panelInfo.id, viewSave)
|
||||
|
||||
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.param.id, viewInfo: view })
|
||||
},
|
||||
|
||||
closeEdit() {
|
||||
@ -1529,6 +1586,9 @@ export default {
|
||||
this.$success(this.$t('commons.save_success'))
|
||||
})
|
||||
},
|
||||
closePanelEdit() {
|
||||
bus.$emit('change_panel_right_draw', false)
|
||||
},
|
||||
close() {
|
||||
this.closeChangeChart()
|
||||
// 从仪表板入口关闭
|
||||
@ -1542,7 +1602,8 @@ export default {
|
||||
if (id) {
|
||||
ajaxGetDataOnly(id, this.panelInfo.id, {
|
||||
filter: [],
|
||||
drill: this.drillClickDimensionList
|
||||
drill: this.drillClickDimensionList,
|
||||
queryFrom: 'panelEdit'
|
||||
}).then(response => {
|
||||
this.initTableData(response.data.tableId)
|
||||
this.view = JSON.parse(JSON.stringify(response.data))
|
||||
@ -1585,9 +1646,9 @@ export default {
|
||||
this.view = {}
|
||||
}
|
||||
},
|
||||
getChart(id) {
|
||||
getChart(id, queryFrom = 'panel_edit') {
|
||||
if (id) {
|
||||
post('/chart/view/get/' + id + '/' + this.panelInfo.id, {}).then(response => {
|
||||
getChartDetails(id, this.panelInfo.id, { queryFrom: queryFrom }).then(response => {
|
||||
this.initTableData(response.data.tableId)
|
||||
this.view = JSON.parse(JSON.stringify(response.data))
|
||||
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
||||
@ -2166,7 +2227,10 @@ export default {
|
||||
// this.$refs.dynamicChart && this.$refs.dynamicChart.registerDynamicMap && this.$refs.dynamicChart.registerDynamicMap(this.currentAcreaNode.code)
|
||||
const current = this.$refs.dynamicChart
|
||||
if (this.view.isPlugin) {
|
||||
current && current.callPluginInner({ methodName: 'registerDynamicMap', methodParam: this.currentAcreaNode.code })
|
||||
current && current.callPluginInner({
|
||||
methodName: 'registerDynamicMap',
|
||||
methodParam: this.currentAcreaNode.code
|
||||
})
|
||||
} else {
|
||||
current && current.registerDynamicMap && current.registerDynamicMap(this.currentAcreaNode.code)
|
||||
}
|
||||
@ -2190,7 +2254,10 @@ export default {
|
||||
// this.$refs.dynamicChart && this.$refs.dynamicChart.registerDynamicMap && this.$refs.dynamicChart.registerDynamicMap(nextNode.code)
|
||||
const current = this.$refs.dynamicChart
|
||||
if (this.view.isPlugin) {
|
||||
nextNode && current && current.callPluginInner({ methodName: 'registerDynamicMap', methodParam: nextNode.code })
|
||||
nextNode && current && current.callPluginInner({
|
||||
methodName: 'registerDynamicMap',
|
||||
methodParam: nextNode.code
|
||||
})
|
||||
} else {
|
||||
nextNode && current && current.registerDynamicMap && current.registerDynamicMap(nextNode.code)
|
||||
}
|
||||
@ -2215,9 +2282,17 @@ export default {
|
||||
},
|
||||
|
||||
reset() {
|
||||
this.getData(this.param.id)
|
||||
this.changeEditStatus(false)
|
||||
this.getChart(this.param.id, 'panel')
|
||||
const _this = this
|
||||
resetViewCacheCallBack(this.param.id, this.panelInfo.id, function(rsp) {
|
||||
bus.$emit('view-in-cache', { type: 'propChange', viewId: _this.param.id })
|
||||
})
|
||||
},
|
||||
changeEditStatus(status) {
|
||||
this.hasEdit = status
|
||||
this.$store.commit('recordViewEdit', { viewId: this.param.id, hasEdit: status })
|
||||
},
|
||||
|
||||
changeChartType() {
|
||||
this.setChartDefaultOptions()
|
||||
this.calcData(true, 'chart', true, true)
|
||||
@ -2274,9 +2349,17 @@ export default {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.view-panel-row {
|
||||
display: flex;
|
||||
background-color: #f7f8fa;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: calc(100vh - 75px);
|
||||
}
|
||||
|
||||
.view-panel {
|
||||
display: flex;
|
||||
height: calc(100% - 40px);
|
||||
height: calc(100% - 80px);
|
||||
background-color: #f7f8fa;
|
||||
}
|
||||
|
||||
@ -2379,7 +2462,7 @@ export default {
|
||||
|
||||
.tab-header > > > .el-tabs__item {
|
||||
font-size: 12px;
|
||||
padding: 0 60px!important;
|
||||
padding: 0 60px !important;
|
||||
}
|
||||
|
||||
.blackTheme .tab-header > > > .el-tabs__item {
|
||||
@ -2395,7 +2478,6 @@ export default {
|
||||
}
|
||||
|
||||
.tab-header > > > .el-tabs__content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.draggable-group {
|
||||
@ -2569,11 +2651,33 @@ export default {
|
||||
}
|
||||
|
||||
.result-count {
|
||||
width: 80px;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.radio-span > > > .el-radio__label {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.view-title-name {
|
||||
display: -moz-inline-box;
|
||||
display: inline-block;
|
||||
width: 130px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
margin-left: 45px;
|
||||
}
|
||||
|
||||
::v-deep .item-axis {
|
||||
width: 128px !important;
|
||||
}
|
||||
|
||||
::v-deep .el-slider__input {
|
||||
width: 80px !important;
|
||||
}
|
||||
|
||||
::v-deep .el-input-number--mini {
|
||||
width: 80px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -145,12 +145,12 @@ export default {
|
||||
init() {
|
||||
if (this.data.id) {
|
||||
if (this.type === 'dataset') {
|
||||
post('/dataset/table/datasetDetail/' + this.data.id, null).then(res => {
|
||||
post('/dataset/table/datasetDetail/' + this.data.id, null,false).then(res => {
|
||||
this.detail = res.data
|
||||
this.info = JSON.parse(res.data.table.info)
|
||||
})
|
||||
} else if (this.type === 'chart') {
|
||||
post('/chart/view/chartDetail/' + this.data.id + '/' + this.panelInfo.id, null).then(res => {
|
||||
post('/chart/view/chartDetail/' + this.data.id + '/' + this.panelInfo.id, null,false).then(res => {
|
||||
this.detail = res.data
|
||||
this.info = JSON.parse(res.data.table.info)
|
||||
})
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-col v-loading="loading">
|
||||
<el-row style="margin-top: 5px">
|
||||
<el-row style="margin-left: 5px;margin-right: 5px">
|
||||
<el-col :span="23">
|
||||
<el-col :span="17">
|
||||
<el-input
|
||||
v-model="templateFilterText"
|
||||
:placeholder="$t('panel.filter_keywords')"
|
||||
@ -11,9 +11,9 @@
|
||||
prefix-icon="el-icon-search"
|
||||
/>
|
||||
</el-col>
|
||||
<!-- <el-col v-if="!selectModel" :span="7">-->
|
||||
<!-- <el-button type="primary" size="mini" style="float: right" @click="newChart">新建 </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col v-if="!selectModel" :span="7">
|
||||
<el-button type="primary" size="mini" style="float: right" @click="newChart">新建 </el-button>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row style="margin-top: 5px">
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-header class="de-header">
|
||||
<el-col :span="8" style="text-overflow:ellipsis;overflow: hidden;white-space: nowrap;color: #606266;font-size: 16px">
|
||||
<el-col
|
||||
:span="8"
|
||||
style="text-overflow:ellipsis;overflow: hidden;white-space: nowrap;color: #606266;font-size: 16px"
|
||||
>
|
||||
<span style="line-height: 35px;">
|
||||
{{ $t('commons.name') }} :{{ panelInfo.name || '测试仪表板' }}
|
||||
</span>
|
||||
@ -19,66 +22,113 @@
|
||||
</el-col>
|
||||
</el-header>
|
||||
<de-container>
|
||||
<!--左侧导航栏-->
|
||||
<de-aside-container class="ms-aside-container">
|
||||
<div v-if="showAside" style="width: 60px; left: 0px; top: 0px; bottom: 0px; position: absolute">
|
||||
<div style="width: 60px;height: 100%;overflow: hidden auto;position: relative;margin: 0px auto; font-size: 14px">
|
||||
<div
|
||||
style="width: 60px;height: 100%;overflow: hidden auto;position: relative;margin: 0px auto; font-size: 14px"
|
||||
>
|
||||
<!-- 视图图表 start -->
|
||||
<div class="button-div-class" style=" width: 24px;height: 24px;text-align: center;line-height: 1;position: relative;margin: 16px auto 0px;">
|
||||
<div
|
||||
class="button-div-class"
|
||||
style=" width: 24px;height: 24px;text-align: center;line-height: 1;position: relative;margin: 16px auto 0px;"
|
||||
>
|
||||
<el-button circle class="el-icon-circle-plus-outline" size="mini" @click="newChart()" />
|
||||
</div>
|
||||
<div class="button-text" style="position: relative; margin: 18px auto 16px;">
|
||||
<div style="max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;">
|
||||
<div
|
||||
style="max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
|
||||
>
|
||||
{{ $t('panel.view') }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 1px; position: relative; margin: 0px auto;background-color:#E6E6E6;">
|
||||
<div style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;" />
|
||||
<div
|
||||
style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
|
||||
/>
|
||||
</div>
|
||||
<!-- 视图图表 end -->
|
||||
<!-- 过滤组件 start -->
|
||||
|
||||
<div class="button-div-class" style=" width: 24px;height: 24px;text-align: center;line-height: 1;position: relative;margin: 16px auto 0px; ">
|
||||
<el-button circle :class="show&&showIndex===1? 'button-show':'button-closed'" class="el-icon-s-tools" size="mini" @click="showPanel(1)" />
|
||||
<div
|
||||
class="button-div-class"
|
||||
style=" width: 24px;height: 24px;text-align: center;line-height: 1;position: relative;margin: 16px auto 0px; "
|
||||
>
|
||||
<el-button
|
||||
circle
|
||||
:class="show&&showIndex===1? 'button-show':'button-closed'"
|
||||
class="el-icon-s-tools"
|
||||
size="mini"
|
||||
@click="showPanel(1)"
|
||||
/>
|
||||
</div>
|
||||
<div class="button-text" style=" position: relative; margin: 18px auto 16px;">
|
||||
<div style=" max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;">
|
||||
<div
|
||||
style=" max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
|
||||
>
|
||||
{{ $t('panel.module') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height: 1px; position: relative; margin: 0px auto;background-color:#E6E6E6;">
|
||||
<div style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;" />
|
||||
<div
|
||||
style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
|
||||
/>
|
||||
</div>
|
||||
<!-- 过滤组件 end -->
|
||||
<!-- 其他组件 start -->
|
||||
|
||||
<div class="button-div-class" style=" width: 24px;height: 24px;text-align: center;line-height: 1;position: relative;margin: 16px auto 0px; ">
|
||||
<el-button circle :class="show&&showIndex===3? 'button-show':'button-closed'" class="el-icon-brush" size="mini" @click="showPanel(3)" />
|
||||
<div
|
||||
class="button-div-class"
|
||||
style=" width: 24px;height: 24px;text-align: center;line-height: 1;position: relative;margin: 16px auto 0px; "
|
||||
>
|
||||
<el-button
|
||||
circle
|
||||
:class="show&&showIndex===3? 'button-show':'button-closed'"
|
||||
class="el-icon-brush"
|
||||
size="mini"
|
||||
@click="showPanel(3)"
|
||||
/>
|
||||
</div>
|
||||
<div class="button-text" style=" position: relative; margin: 18px auto 16px;">
|
||||
<div style=" max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;">
|
||||
<div
|
||||
style=" max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
|
||||
>
|
||||
{{ $t('panel.other_module') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height: 1px; position: relative; margin: 0px auto;background-color:#E6E6E6;">
|
||||
<div style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;" />
|
||||
<div
|
||||
style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
|
||||
/>
|
||||
</div>
|
||||
<!-- 其他组件 end -->
|
||||
|
||||
<!-- 视图复用 start -->
|
||||
<div class="button-div-class" style=" width: 24px;height: 24px;text-align: center;line-height: 1;position: relative;margin: 16px auto 0px;">
|
||||
<el-button :class="show&&showIndex===0? 'button-show':'button-closed'" circle class="el-icon-copy-document" size="mini" @click="showPanel(0)" />
|
||||
<div
|
||||
class="button-div-class"
|
||||
style=" width: 24px;height: 24px;text-align: center;line-height: 1;position: relative;margin: 16px auto 0px;"
|
||||
>
|
||||
<el-button
|
||||
:class="show&&showIndex===0? 'button-show':'button-closed'"
|
||||
circle
|
||||
class="el-icon-copy-document"
|
||||
size="mini"
|
||||
@click="showPanel(0)"
|
||||
/>
|
||||
</div>
|
||||
<div class="button-text" style="position: relative; margin: 18px auto 16px;">
|
||||
<div style="max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;">
|
||||
<div
|
||||
style="max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
|
||||
>
|
||||
<!-- {{ $t('panel.view') }}-->
|
||||
复用
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 1px; position: relative; margin: 0px auto;background-color:#E6E6E6;">
|
||||
<div style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;" />
|
||||
<div
|
||||
style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
|
||||
/>
|
||||
</div>
|
||||
<!-- 视图复用 end -->
|
||||
</div>
|
||||
@ -141,12 +191,26 @@
|
||||
class="this_mobile_canvas_main"
|
||||
:style="mobileCanvasStyle"
|
||||
>
|
||||
<Editor v-if="mobileEditorShow" id="editorMobile" ref="editorMobile" :matrix-count="mobileMatrixCount" :out-style="outStyle" :scroll-top="scrollTop" @canvasDragging="canvasDragging" />
|
||||
<Editor
|
||||
v-if="mobileEditorShow"
|
||||
id="editorMobile"
|
||||
ref="editorMobile"
|
||||
:matrix-count="mobileMatrixCount"
|
||||
:out-style="outStyle"
|
||||
:scroll-top="scrollTop"
|
||||
@canvasDragging="canvasDragging"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row class="this_mobile_canvas_inner_bottom">
|
||||
<el-col :span="12">
|
||||
<i v-if="!hasStar" class="el-icon-star-off" size="mini" @click="star" />
|
||||
<i v-if="hasStar" class="el-icon-star-on" style="color: #0a7be0;font-size: 18px" size="mini" @click="unstar" />
|
||||
<i
|
||||
v-if="hasStar"
|
||||
class="el-icon-star-on"
|
||||
style="color: #0a7be0;font-size: 18px"
|
||||
size="mini"
|
||||
@click="unstar"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="12" style="float: right">
|
||||
<i class="el-icon-refresh-right" size="mini" @click="mobileRefresh" />
|
||||
@ -160,6 +224,24 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</de-main-container>
|
||||
|
||||
<div v-show="!this.mobileLayoutStatus&&this.rightDrawOpen" class="tools-window-main">
|
||||
<div v-show="showViewToolsAside">
|
||||
<chart-edit v-if="this.curComponent" ref="chartEditRef" :edit-from="'panel'" :param="chartEditParam" />
|
||||
</div>
|
||||
<div v-if="!showViewToolsAside">
|
||||
<el-row style="height: 40px">
|
||||
<el-tooltip :content="$t('chart.draw_back')">
|
||||
<el-button class="el-icon-d-arrow-right" style="position:absolute;left: 4px;top: 5px;" size="mini" circle @click="changeRightDrawOpen(false)" />
|
||||
</el-tooltip>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="view-selected-message-class">
|
||||
<span style="font-size: 14px;margin-left: 10px;font-weight: bold;line-height: 20px">{{$t('panel.select_view')}}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</de-container>
|
||||
|
||||
<el-dialog
|
||||
@ -202,9 +284,21 @@
|
||||
</el-dialog>
|
||||
|
||||
<fullscreen style="height: 100%;background: #f7f8fa;overflow-y: auto" :fullscreen.sync="previewVisible">
|
||||
<Preview v-if="previewVisible" :in-screen="!previewVisible" :show-type="canvasStyleData.selfAdaption?'full':'width'" />
|
||||
<Preview
|
||||
v-if="previewVisible"
|
||||
:in-screen="!previewVisible"
|
||||
:show-type="canvasStyleData.selfAdaption?'full':'width'"
|
||||
/>
|
||||
</fullscreen>
|
||||
<input id="input" ref="files" type="file" accept="image/*" hidden @click="e => {e.target.value = '';}" @change="handleFileChange">
|
||||
<input
|
||||
id="input"
|
||||
ref="files"
|
||||
type="file"
|
||||
accept="image/*"
|
||||
hidden
|
||||
@click="e => {e.target.value = '';}"
|
||||
@change="handleFileChange"
|
||||
>
|
||||
|
||||
<!--矩形样式组件-->
|
||||
<TextAttr v-if="showAttr" :scroll-left="scrollLeft" :scroll-top="scrollTop" />
|
||||
@ -240,7 +334,7 @@ import componentList, {
|
||||
import { mapState } from 'vuex'
|
||||
import { uuid } from 'vue-uuid'
|
||||
import Toolbar from '@/components/canvas/components/Toolbar'
|
||||
import { initPanelData } from '@/api/panel/panel'
|
||||
import { initPanelComponentsData, 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'
|
||||
@ -259,6 +353,7 @@ import generateID from '@/components/canvas/utils/generateID'
|
||||
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'
|
||||
|
||||
export default {
|
||||
name: 'PanelEdit',
|
||||
@ -278,7 +373,8 @@ export default {
|
||||
AssistComponent,
|
||||
PanelTextEditor,
|
||||
TextAttr,
|
||||
ChartGroup
|
||||
ChartGroup,
|
||||
ChartEdit
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -332,15 +428,29 @@ export default {
|
||||
'de-video'
|
||||
],
|
||||
enableSureButton: false,
|
||||
filterFromDrag: false
|
||||
filterFromDrag: false,
|
||||
activeToolsName: 'view',
|
||||
rightDrawOpen: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
// 侧边显示控制
|
||||
chartEditParam() {
|
||||
return this.curComponent ? { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' } : {}
|
||||
},
|
||||
// 侧边显示控制
|
||||
showAside() {
|
||||
return !this.linkageSettingStatus && !this.mobileLayoutStatus
|
||||
},
|
||||
// 显示仪表板工具栏
|
||||
showPanelToolsAside() {
|
||||
return !this.curComponent
|
||||
},
|
||||
// 显示视图工具栏
|
||||
showViewToolsAside() {
|
||||
return this.curComponent && this.curComponent.type === 'view'
|
||||
},
|
||||
showAttr() {
|
||||
if (this.mobileLayoutStatus) {
|
||||
return false
|
||||
@ -449,6 +559,7 @@ export default {
|
||||
|
||||
this.$store.commit('setCurComponent', { component: null, index: null })
|
||||
this.$store.commit('clearLinkageSettingInfo', false)
|
||||
this.$store.commit('resetViewEditInfo')
|
||||
},
|
||||
mounted() {
|
||||
// this.insertToBody()
|
||||
@ -466,6 +577,10 @@ export default {
|
||||
bus.$on('previewFullScreenClose', () => {
|
||||
this.previewVisible = false
|
||||
})
|
||||
|
||||
bus.$on('change_panel_right_draw', (param) => {
|
||||
this.changeRightDrawOpen(param)
|
||||
})
|
||||
const _this = this
|
||||
const erd = elementResizeDetectorMaker()
|
||||
// 监听div变动事件
|
||||
@ -480,6 +595,14 @@ export default {
|
||||
elx && elx.remove()
|
||||
},
|
||||
methods: {
|
||||
changeRightDrawOpen(param) {
|
||||
this.rightDrawOpen = param
|
||||
if (this.rightDrawOpen) {
|
||||
setTimeout(() => {
|
||||
this.outStyle.width = this.outStyle.width + 0.000001
|
||||
}, 0)
|
||||
}
|
||||
},
|
||||
init(panelId) {
|
||||
const _this = this
|
||||
_this.initHasStar()
|
||||
@ -493,7 +616,12 @@ export default {
|
||||
_this.$store.dispatch('panel/setCanvasStyleDataTemp', null)
|
||||
} else if (panelId) {
|
||||
initPanelData(panelId, function() {
|
||||
_this.$store.commit('recordSnapshot', 'init')// 记录快照
|
||||
// 初始化视图缓存
|
||||
initViewCache(panelId)
|
||||
// initPanelComponentsData(panelId, function(rsp) {
|
||||
// _this.$store.commit('initPanelComponents', rsp)// 初始化仪表板组件视图数据
|
||||
// _this.$store.commit('recordSnapshot', 'init')// 记录快照
|
||||
// })
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -854,7 +982,10 @@ export default {
|
||||
if (this.curComponent.type === 'view') {
|
||||
this.$store.dispatch('chart/setViewId', null)
|
||||
this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId)
|
||||
bus.$emit('PanelSwitchComponent', { name: 'ChartEdit', param: { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' }})
|
||||
bus.$emit('PanelSwitchComponent', {
|
||||
name: 'ChartEdit',
|
||||
param: { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' }
|
||||
})
|
||||
}
|
||||
},
|
||||
canvasScroll(event) {
|
||||
@ -934,212 +1065,250 @@ export default {
|
||||
border-bottom: 1px solid #E6E6E6;
|
||||
|
||||
}
|
||||
|
||||
.blackTheme .de-header {
|
||||
background-color: var(--SiderBG) !important;
|
||||
color: var(--TextActive);
|
||||
background-color: var(--SiderBG) !important;
|
||||
color: var(--TextActive);
|
||||
}
|
||||
|
||||
.showLeftPanel {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.leftPanel-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
transition: opacity .3s cubic-bezier(.7, .3, .1, 1);
|
||||
background: rgba(0, 0, 0, .2);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.leftPanel {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
height: calc(100vh - 35px);
|
||||
position: fixed;
|
||||
top: 91px;
|
||||
left: 60px;
|
||||
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .05);
|
||||
transition: all .25s cubic-bezier(.7, .3, .1, 1);
|
||||
transform: translate(100%);
|
||||
background: var(--SiderBG, #fff);
|
||||
z-index: 1003;
|
||||
}
|
||||
|
||||
.show {
|
||||
transition: all .3s cubic-bezier(.7, .3, .1, 1);
|
||||
|
||||
.leftPanel-background {
|
||||
z-index: 1002;
|
||||
opacity: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
transition: opacity .3s cubic-bezier(.7, .3, .1, 1);
|
||||
background: rgba(0, 0, 0, .2);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.leftPanel {
|
||||
transform: translate(0);
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
height: calc(100vh - 35px);
|
||||
position: fixed;
|
||||
top: 91px;
|
||||
left: 60px;
|
||||
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .05);
|
||||
transition: all .25s cubic-bezier(.7, .3, .1, 1);
|
||||
transform: translate(100%);
|
||||
background: var(--SiderBG, #fff);
|
||||
z-index: 1003;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile_canvas_main{
|
||||
width: 80%;
|
||||
height: 90%;
|
||||
margin-left: 10%;
|
||||
margin-top: 3%;
|
||||
}
|
||||
.show {
|
||||
transition: all .3s cubic-bezier(.7, .3, .1, 1);
|
||||
|
||||
.this_mobile_canvas{
|
||||
border-radius:30px;
|
||||
min-width: 300px;
|
||||
max-width: 350px;
|
||||
min-height: 600px;
|
||||
max-height: 700px;
|
||||
overflow: hidden;
|
||||
background-color: #000000;
|
||||
background-size:100% 100% !important;
|
||||
}
|
||||
.leftPanel-background {
|
||||
z-index: 1002;
|
||||
opacity: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_inner_top{
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
background-color: #f7f8fa;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_top{
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_inner_bottom{
|
||||
background-color: #f7f8fa;
|
||||
line-height: 30px;
|
||||
vertical-align: middle;
|
||||
color: gray;
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_bottom{
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_main{
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
height: calc(100% - 120px);;
|
||||
background-color: #d7d9e3;
|
||||
background-size:100% 100% !important;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_cell{
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.this_mobile_canvas_wait_cell{
|
||||
background-size:100% 100% !important;
|
||||
border: 2px solid #9ea6b2
|
||||
}
|
||||
|
||||
.this_canvas{
|
||||
width: 100%;
|
||||
height: calc(100vh - 35px);
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
background-size:100% 100% !important;
|
||||
}
|
||||
.el-main{
|
||||
height: calc(100vh - 35px);
|
||||
padding: 0!important;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-main ::v-deep .el-drawer__wrapper{
|
||||
width: 310px!important;
|
||||
}
|
||||
.el-main ::v-deep .el-drawer__body{
|
||||
overflow-y: auto;
|
||||
}
|
||||
.button-show{
|
||||
background-color: var(--ContentBG, #ebf2fe)!important;
|
||||
}
|
||||
|
||||
.button-closed{
|
||||
background-color: var(--SiderBG, #ffffff)!important;
|
||||
}
|
||||
.style-aside{
|
||||
width: 250px;
|
||||
max-width:250px!important;
|
||||
border: 1px solid var(--TableBorderColor, #E6E6E6);
|
||||
padding: 10px;
|
||||
transition: all 0.3s;
|
||||
|
||||
}
|
||||
.placeholder{
|
||||
font-size: 14px;
|
||||
color: gray;
|
||||
}
|
||||
.show {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.hidden {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.style-edit-dialog {
|
||||
width: 300px!important;
|
||||
height: 400px!important;
|
||||
|
||||
.el-dialog__header{
|
||||
padding: 10px 20px !important;
|
||||
|
||||
.el-dialog__headerbtn {
|
||||
top: 15px !important;
|
||||
.leftPanel {
|
||||
transform: translate(0);
|
||||
}
|
||||
}
|
||||
.el-dialog__body{
|
||||
padding: 1px 15px !important;
|
||||
|
||||
.mobile_canvas_main {
|
||||
width: 80%;
|
||||
height: 90%;
|
||||
margin-left: 10%;
|
||||
margin-top: 3%;
|
||||
}
|
||||
}
|
||||
.style-hidden{
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.button-text {
|
||||
|
||||
.this_mobile_canvas {
|
||||
border-radius: 30px;
|
||||
min-width: 300px;
|
||||
max-width: 350px;
|
||||
min-height: 600px;
|
||||
max-height: 700px;
|
||||
overflow: hidden;
|
||||
background-color: #000000;
|
||||
background-size: 100% 100% !important;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_inner_top {
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
background-color: #f7f8fa;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_top {
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_inner_bottom {
|
||||
background-color: #f7f8fa;
|
||||
line-height: 30px;
|
||||
vertical-align: middle;
|
||||
color: gray;
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_bottom {
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_main {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
height: calc(100% - 120px);;
|
||||
background-color: #d7d9e3;
|
||||
background-size: 100% 100% !important;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_cell {
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.this_mobile_canvas_wait_cell {
|
||||
background-size: 100% 100% !important;
|
||||
border: 2px solid #9ea6b2
|
||||
}
|
||||
|
||||
.this_canvas {
|
||||
width: 100%;
|
||||
height: calc(100vh - 35px);
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
background-size: 100% 100% !important;
|
||||
}
|
||||
|
||||
.el-main {
|
||||
height: calc(100vh - 35px);
|
||||
padding: 0 !important;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-main ::v-deep .el-drawer__wrapper {
|
||||
width: 310px !important;
|
||||
}
|
||||
|
||||
.el-main ::v-deep .el-drawer__body {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.button-show {
|
||||
background-color: var(--ContentBG, #ebf2fe) !important;
|
||||
}
|
||||
|
||||
.button-closed {
|
||||
background-color: var(--SiderBG, #ffffff) !important;
|
||||
}
|
||||
|
||||
.style-aside {
|
||||
width: 250px;
|
||||
max-width: 250px !important;
|
||||
border: 1px solid var(--TableBorderColor, #E6E6E6);
|
||||
padding: 10px;
|
||||
transition: all 0.3s;
|
||||
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
font-size: 14px;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.show {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.hidden {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.style-edit-dialog {
|
||||
width: 300px !important;
|
||||
height: 400px !important;
|
||||
|
||||
.el-dialog__header {
|
||||
padding: 10px 20px !important;
|
||||
|
||||
.el-dialog__headerbtn {
|
||||
top: 15px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding: 1px 15px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.style-hidden {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
color: var(--TextActive);
|
||||
}
|
||||
.mobile-canvas{
|
||||
}
|
||||
|
||||
.mobile-canvas {
|
||||
width: 300px;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.info-class{
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #FFFFFF;
|
||||
font-size: 12px;
|
||||
color: #9ea6b2;
|
||||
}
|
||||
.info-class {
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #FFFFFF;
|
||||
font-size: 12px;
|
||||
color: #9ea6b2;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 2px!important;
|
||||
height: 2px!important;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 2px !important;
|
||||
height: 2px !important;
|
||||
}
|
||||
|
||||
.tools-window-main {
|
||||
width: 300px;
|
||||
background-color: #FFFFFF;
|
||||
transition: 1s;
|
||||
}
|
||||
|
||||
.tools-window-tabs {
|
||||
height: calc(100vh - 100px);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
> > > .el-tabs__item {
|
||||
padding: 0 15px;
|
||||
}
|
||||
.view-selected-message-class {
|
||||
font-size: 12px;
|
||||
color: #9ea6b2;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: calc(100vh - 100px);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user