Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
9a8cc0c1
提交
9a8cc0c1
authored
3月 14, 2022
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 仪表板模板保存支持保存临时数据
上级
f1b4c537
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
899 行增加
和
38 行删除
+899
-38
PanelGroupExtend.java
...c/main/java/io/dataease/base/domain/PanelGroupExtend.java
+20
-0
PanelGroupExtendData.java
...in/java/io/dataease/base/domain/PanelGroupExtendData.java
+18
-0
PanelGroupExtendDataExample.java
.../io/dataease/base/domain/PanelGroupExtendDataExample.java
+0
-0
PanelGroupExtendExample.java
...java/io/dataease/base/domain/PanelGroupExtendExample.java
+0
-0
PanelView.java
backend/src/main/java/io/dataease/base/domain/PanelView.java
+2
-0
PanelViewExample.java
...c/main/java/io/dataease/base/domain/PanelViewExample.java
+70
-0
PanelGroupExtendDataMapper.java
...a/io/dataease/base/mapper/PanelGroupExtendDataMapper.java
+37
-0
PanelGroupExtendDataMapper.xml
...va/io/dataease/base/mapper/PanelGroupExtendDataMapper.xml
+235
-0
PanelGroupExtendMapper.java
.../java/io/dataease/base/mapper/PanelGroupExtendMapper.java
+37
-0
PanelGroupExtendMapper.xml
...n/java/io/dataease/base/mapper/PanelGroupExtendMapper.xml
+254
-0
PanelViewMapper.xml
...src/main/java/io/dataease/base/mapper/PanelViewMapper.xml
+23
-5
ExtPanelGroupExtendDataMapper.java
...taease/base/mapper/ext/ExtPanelGroupExtendDataMapper.java
+10
-0
ExtPanelGroupExtendDataMapper.xml
...ataease/base/mapper/ext/ExtPanelGroupExtendDataMapper.xml
+12
-0
PanelConstants.java
...in/java/io/dataease/commons/constants/PanelConstants.java
+13
-0
PanelGroupRequest.java
.../dataease/controller/request/panel/PanelGroupRequest.java
+7
-0
PanelGroupExtendDataDTO.java
...rc/main/java/io/dataease/dto/PanelGroupExtendDataDTO.java
+25
-0
PanelViewInsertDTO.java
...ain/java/io/dataease/dto/panel/po/PanelViewInsertDTO.java
+7
-0
PanelGroupService.java
...ain/java/io/dataease/service/panel/PanelGroupService.java
+57
-13
PanelViewService.java
...main/java/io/dataease/service/panel/PanelViewService.java
+5
-0
V33__1.9.sql
backend/src/main/resources/db/migration/V33__1.9.sql
+35
-0
generatorConfig.xml
backend/src/main/resources/generatorConfig.xml
+4
-2
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+5
-1
index.js
frontend/src/store/index.js
+3
-1
index.vue
frontend/src/views/panel/list/EditPanel/index.vue
+14
-11
PanelViewShow.vue
frontend/src/views/panel/list/PanelViewShow.vue
+5
-4
TemplateImport.vue
...end/src/views/panel/template/component/TemplateImport.vue
+1
-1
没有找到文件。
backend/src/main/java/io/dataease/base/domain/PanelGroupExtend.java
0 → 100644
浏览文件 @
9a8cc0c1
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
lombok.Data
;
@Data
public
class
PanelGroupExtend
implements
Serializable
{
private
String
id
;
private
String
panelId
;
private
String
templateId
;
private
String
templateVersion
;
private
String
templateDynamicData
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/PanelGroupExtendData.java
0 → 100644
浏览文件 @
9a8cc0c1
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
lombok.Data
;
@Data
public
class
PanelGroupExtendData
implements
Serializable
{
private
String
id
;
private
String
panelId
;
private
String
viewId
;
private
String
viewDetails
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/PanelGroupExtendDataExample.java
0 → 100644
浏览文件 @
9a8cc0c1
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/base/domain/PanelGroupExtendExample.java
0 → 100644
浏览文件 @
9a8cc0c1
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/base/domain/PanelView.java
浏览文件 @
9a8cc0c1
...
@@ -29,6 +29,8 @@ public class PanelView implements Serializable {
...
@@ -29,6 +29,8 @@ public class PanelView implements Serializable {
private
String
copyId
;
private
String
copyId
;
private
String
dataFrom
;
private
byte
[]
content
;
private
byte
[]
content
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
backend/src/main/java/io/dataease/base/domain/PanelViewExample.java
浏览文件 @
9a8cc0c1
...
@@ -923,6 +923,76 @@ public class PanelViewExample {
...
@@ -923,6 +923,76 @@ public class PanelViewExample {
addCriterion
(
"copy_id not between"
,
value1
,
value2
,
"copyId"
);
addCriterion
(
"copy_id not between"
,
value1
,
value2
,
"copyId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andDataFromIsNull
()
{
addCriterion
(
"data_from is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromIsNotNull
()
{
addCriterion
(
"data_from is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromEqualTo
(
String
value
)
{
addCriterion
(
"data_from ="
,
value
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromNotEqualTo
(
String
value
)
{
addCriterion
(
"data_from <>"
,
value
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromGreaterThan
(
String
value
)
{
addCriterion
(
"data_from >"
,
value
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"data_from >="
,
value
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromLessThan
(
String
value
)
{
addCriterion
(
"data_from <"
,
value
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"data_from <="
,
value
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromLike
(
String
value
)
{
addCriterion
(
"data_from like"
,
value
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromNotLike
(
String
value
)
{
addCriterion
(
"data_from not like"
,
value
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromIn
(
List
<
String
>
values
)
{
addCriterion
(
"data_from in"
,
values
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"data_from not in"
,
values
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"data_from between"
,
value1
,
value2
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataFromNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"data_from not between"
,
value1
,
value2
,
"dataFrom"
);
return
(
Criteria
)
this
;
}
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
backend/src/main/java/io/dataease/base/mapper/PanelGroupExtendDataMapper.java
0 → 100644
浏览文件 @
9a8cc0c1
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.PanelGroupExtendData
;
import
io.dataease.base.domain.PanelGroupExtendDataExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
PanelGroupExtendDataMapper
{
long
countByExample
(
PanelGroupExtendDataExample
example
);
int
deleteByExample
(
PanelGroupExtendDataExample
example
);
int
deleteByPrimaryKey
(
String
id
);
int
insert
(
PanelGroupExtendData
record
);
int
insertSelective
(
PanelGroupExtendData
record
);
List
<
PanelGroupExtendData
>
selectByExampleWithBLOBs
(
PanelGroupExtendDataExample
example
);
List
<
PanelGroupExtendData
>
selectByExample
(
PanelGroupExtendDataExample
example
);
PanelGroupExtendData
selectByPrimaryKey
(
String
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
PanelGroupExtendData
record
,
@Param
(
"example"
)
PanelGroupExtendDataExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
PanelGroupExtendData
record
,
@Param
(
"example"
)
PanelGroupExtendDataExample
example
);
int
updateByExample
(
@Param
(
"record"
)
PanelGroupExtendData
record
,
@Param
(
"example"
)
PanelGroupExtendDataExample
example
);
int
updateByPrimaryKeySelective
(
PanelGroupExtendData
record
);
int
updateByPrimaryKeyWithBLOBs
(
PanelGroupExtendData
record
);
int
updateByPrimaryKey
(
PanelGroupExtendData
record
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/PanelGroupExtendDataMapper.xml
0 → 100644
浏览文件 @
9a8cc0c1
<?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.PanelGroupExtendDataMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.dataease.base.domain.PanelGroupExtendData"
>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"panel_id"
jdbcType=
"VARCHAR"
property=
"panelId"
/>
<result
column=
"view_id"
jdbcType=
"VARCHAR"
property=
"viewId"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"io.dataease.base.domain.PanelGroupExtendData"
>
<result
column=
"view_details"
jdbcType=
"LONGVARCHAR"
property=
"viewDetails"
/>
</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, panel_id, view_id
</sql>
<sql
id=
"Blob_Column_List"
>
view_details
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"io.dataease.base.domain.PanelGroupExtendDataExample"
resultMap=
"ResultMapWithBLOBs"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from panel_group_extend_data
<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.PanelGroupExtendDataExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from panel_group_extend_data
<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 panel_group_extend_data
where id = #{id,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from panel_group_extend_data
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.dataease.base.domain.PanelGroupExtendDataExample"
>
delete from panel_group_extend_data
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.PanelGroupExtendData"
>
insert into panel_group_extend_data (id, panel_id, view_id,
view_details)
values (#{id,jdbcType=VARCHAR}, #{panelId,jdbcType=VARCHAR}, #{viewId,jdbcType=VARCHAR},
#{viewDetails,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.PanelGroupExtendData"
>
insert into panel_group_extend_data
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"panelId != null"
>
panel_id,
</if>
<if
test=
"viewId != null"
>
view_id,
</if>
<if
test=
"viewDetails != null"
>
view_details,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=VARCHAR},
</if>
<if
test=
"panelId != null"
>
#{panelId,jdbcType=VARCHAR},
</if>
<if
test=
"viewId != null"
>
#{viewId,jdbcType=VARCHAR},
</if>
<if
test=
"viewDetails != null"
>
#{viewDetails,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.dataease.base.domain.PanelGroupExtendDataExample"
resultType=
"java.lang.Long"
>
select count(*) from panel_group_extend_data
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update panel_group_extend_data
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=VARCHAR},
</if>
<if
test=
"record.panelId != null"
>
panel_id = #{record.panelId,jdbcType=VARCHAR},
</if>
<if
test=
"record.viewId != null"
>
view_id = #{record.viewId,jdbcType=VARCHAR},
</if>
<if
test=
"record.viewDetails != null"
>
view_details = #{record.viewDetails,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update panel_group_extend_data
set id = #{record.id,jdbcType=VARCHAR},
panel_id = #{record.panelId,jdbcType=VARCHAR},
view_id = #{record.viewId,jdbcType=VARCHAR},
view_details = #{record.viewDetails,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update panel_group_extend_data
set id = #{record.id,jdbcType=VARCHAR},
panel_id = #{record.panelId,jdbcType=VARCHAR},
view_id = #{record.viewId,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"io.dataease.base.domain.PanelGroupExtendData"
>
update panel_group_extend_data
<set>
<if
test=
"panelId != null"
>
panel_id = #{panelId,jdbcType=VARCHAR},
</if>
<if
test=
"viewId != null"
>
view_id = #{viewId,jdbcType=VARCHAR},
</if>
<if
test=
"viewDetails != null"
>
view_details = #{viewDetails,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"io.dataease.base.domain.PanelGroupExtendData"
>
update panel_group_extend_data
set panel_id = #{panelId,jdbcType=VARCHAR},
view_id = #{viewId,jdbcType=VARCHAR},
view_details = #{viewDetails,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"io.dataease.base.domain.PanelGroupExtendData"
>
update panel_group_extend_data
set panel_id = #{panelId,jdbcType=VARCHAR},
view_id = #{viewId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/PanelGroupExtendMapper.java
0 → 100644
浏览文件 @
9a8cc0c1
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.PanelGroupExtend
;
import
io.dataease.base.domain.PanelGroupExtendExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
PanelGroupExtendMapper
{
long
countByExample
(
PanelGroupExtendExample
example
);
int
deleteByExample
(
PanelGroupExtendExample
example
);
int
deleteByPrimaryKey
(
String
id
);
int
insert
(
PanelGroupExtend
record
);
int
insertSelective
(
PanelGroupExtend
record
);
List
<
PanelGroupExtend
>
selectByExampleWithBLOBs
(
PanelGroupExtendExample
example
);
List
<
PanelGroupExtend
>
selectByExample
(
PanelGroupExtendExample
example
);
PanelGroupExtend
selectByPrimaryKey
(
String
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
PanelGroupExtend
record
,
@Param
(
"example"
)
PanelGroupExtendExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
PanelGroupExtend
record
,
@Param
(
"example"
)
PanelGroupExtendExample
example
);
int
updateByExample
(
@Param
(
"record"
)
PanelGroupExtend
record
,
@Param
(
"example"
)
PanelGroupExtendExample
example
);
int
updateByPrimaryKeySelective
(
PanelGroupExtend
record
);
int
updateByPrimaryKeyWithBLOBs
(
PanelGroupExtend
record
);
int
updateByPrimaryKey
(
PanelGroupExtend
record
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/PanelGroupExtendMapper.xml
0 → 100644
浏览文件 @
9a8cc0c1
<?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.PanelGroupExtendMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.dataease.base.domain.PanelGroupExtend"
>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"panel_id"
jdbcType=
"VARCHAR"
property=
"panelId"
/>
<result
column=
"template_id"
jdbcType=
"VARCHAR"
property=
"templateId"
/>
<result
column=
"template_version"
jdbcType=
"VARCHAR"
property=
"templateVersion"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"io.dataease.base.domain.PanelGroupExtend"
>
<result
column=
"template_dynamic_data"
jdbcType=
"LONGVARCHAR"
property=
"templateDynamicData"
/>
</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, panel_id, template_id, template_version
</sql>
<sql
id=
"Blob_Column_List"
>
template_dynamic_data
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"io.dataease.base.domain.PanelGroupExtendExample"
resultMap=
"ResultMapWithBLOBs"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from panel_group_extend
<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.PanelGroupExtendExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from panel_group_extend
<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 panel_group_extend
where id = #{id,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from panel_group_extend
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.dataease.base.domain.PanelGroupExtendExample"
>
delete from panel_group_extend
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.PanelGroupExtend"
>
insert into panel_group_extend (id, panel_id, template_id,
template_version, template_dynamic_data
)
values (#{id,jdbcType=VARCHAR}, #{panelId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR},
#{templateVersion,jdbcType=VARCHAR}, #{templateDynamicData,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.PanelGroupExtend"
>
insert into panel_group_extend
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"panelId != null"
>
panel_id,
</if>
<if
test=
"templateId != null"
>
template_id,
</if>
<if
test=
"templateVersion != null"
>
template_version,
</if>
<if
test=
"templateDynamicData != null"
>
template_dynamic_data,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=VARCHAR},
</if>
<if
test=
"panelId != null"
>
#{panelId,jdbcType=VARCHAR},
</if>
<if
test=
"templateId != null"
>
#{templateId,jdbcType=VARCHAR},
</if>
<if
test=
"templateVersion != null"
>
#{templateVersion,jdbcType=VARCHAR},
</if>
<if
test=
"templateDynamicData != null"
>
#{templateDynamicData,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.dataease.base.domain.PanelGroupExtendExample"
resultType=
"java.lang.Long"
>
select count(*) from panel_group_extend
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update panel_group_extend
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=VARCHAR},
</if>
<if
test=
"record.panelId != null"
>
panel_id = #{record.panelId,jdbcType=VARCHAR},
</if>
<if
test=
"record.templateId != null"
>
template_id = #{record.templateId,jdbcType=VARCHAR},
</if>
<if
test=
"record.templateVersion != null"
>
template_version = #{record.templateVersion,jdbcType=VARCHAR},
</if>
<if
test=
"record.templateDynamicData != null"
>
template_dynamic_data = #{record.templateDynamicData,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update panel_group_extend
set id = #{record.id,jdbcType=VARCHAR},
panel_id = #{record.panelId,jdbcType=VARCHAR},
template_id = #{record.templateId,jdbcType=VARCHAR},
template_version = #{record.templateVersion,jdbcType=VARCHAR},
template_dynamic_data = #{record.templateDynamicData,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update panel_group_extend
set id = #{record.id,jdbcType=VARCHAR},
panel_id = #{record.panelId,jdbcType=VARCHAR},
template_id = #{record.templateId,jdbcType=VARCHAR},
template_version = #{record.templateVersion,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"io.dataease.base.domain.PanelGroupExtend"
>
update panel_group_extend
<set>
<if
test=
"panelId != null"
>
panel_id = #{panelId,jdbcType=VARCHAR},
</if>
<if
test=
"templateId != null"
>
template_id = #{templateId,jdbcType=VARCHAR},
</if>
<if
test=
"templateVersion != null"
>
template_version = #{templateVersion,jdbcType=VARCHAR},
</if>
<if
test=
"templateDynamicData != null"
>
template_dynamic_data = #{templateDynamicData,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"io.dataease.base.domain.PanelGroupExtend"
>
update panel_group_extend
set panel_id = #{panelId,jdbcType=VARCHAR},
template_id = #{templateId,jdbcType=VARCHAR},
template_version = #{templateVersion,jdbcType=VARCHAR},
template_dynamic_data = #{templateDynamicData,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"io.dataease.base.domain.PanelGroupExtend"
>
update panel_group_extend
set panel_id = #{panelId,jdbcType=VARCHAR},
template_id = #{templateId,jdbcType=VARCHAR},
template_version = #{templateVersion,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/PanelViewMapper.xml
浏览文件 @
9a8cc0c1
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
<result
column=
"copy_from_view"
jdbcType=
"VARCHAR"
property=
"copyFromView"
/>
<result
column=
"copy_from_view"
jdbcType=
"VARCHAR"
property=
"copyFromView"
/>
<result
column=
"copy_from"
jdbcType=
"VARCHAR"
property=
"copyFrom"
/>
<result
column=
"copy_from"
jdbcType=
"VARCHAR"
property=
"copyFrom"
/>
<result
column=
"copy_id"
jdbcType=
"VARCHAR"
property=
"copyId"
/>
<result
column=
"copy_id"
jdbcType=
"VARCHAR"
property=
"copyId"
/>
<result
column=
"data_from"
jdbcType=
"VARCHAR"
property=
"dataFrom"
/>
</resultMap>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"io.dataease.base.domain.PanelView"
>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"io.dataease.base.domain.PanelView"
>
<result
column=
"content"
jdbcType=
"LONGVARBINARY"
property=
"content"
/>
<result
column=
"content"
jdbcType=
"LONGVARBINARY"
property=
"content"
/>
...
@@ -78,7 +79,7 @@
...
@@ -78,7 +79,7 @@
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, panel_id, chart_view_id, create_by, create_time, update_by, update_time, `position`,
id, panel_id, chart_view_id, create_by, create_time, update_by, update_time, `position`,
copy_from_panel, copy_from_view, copy_from, copy_id
copy_from_panel, copy_from_view, copy_from, copy_id
, data_from
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<sql
id=
"Blob_Column_List"
>
content
content
...
@@ -136,12 +137,12 @@
...
@@ -136,12 +137,12 @@
create_by, create_time, update_by,
create_by, create_time, update_by,
update_time, `position`, copy_from_panel,
update_time, `position`, copy_from_panel,
copy_from_view, copy_from, copy_id,
copy_from_view, copy_from, copy_id,
content)
data_from,
content)
values (#{id,jdbcType=VARCHAR}, #{panelId,jdbcType=VARCHAR}, #{chartViewId,jdbcType=VARCHAR},
values (#{id,jdbcType=VARCHAR}, #{panelId,jdbcType=VARCHAR}, #{chartViewId,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateBy,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=BIGINT}, #{position,jdbcType=VARCHAR}, #{copyFromPanel,jdbcType=VARCHAR},
#{updateTime,jdbcType=BIGINT}, #{position,jdbcType=VARCHAR}, #{copyFromPanel,jdbcType=VARCHAR},
#{copyFromView,jdbcType=VARCHAR}, #{copyFrom,jdbcType=VARCHAR}, #{copyId,jdbcType=VARCHAR},
#{copyFromView,jdbcType=VARCHAR}, #{copyFrom,jdbcType=VARCHAR}, #{copyId,jdbcType=VARCHAR},
#{content,jdbcType=LONGVARBINARY})
#{
dataFrom,jdbcType=VARCHAR}, #{
content,jdbcType=LONGVARBINARY})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.PanelView"
>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.PanelView"
>
insert into panel_view
insert into panel_view
...
@@ -182,6 +183,9 @@
...
@@ -182,6 +183,9 @@
<if
test=
"copyId != null"
>
<if
test=
"copyId != null"
>
copy_id,
copy_id,
</if>
</if>
<if
test=
"dataFrom != null"
>
data_from,
</if>
<if
test=
"content != null"
>
<if
test=
"content != null"
>
content,
content,
</if>
</if>
...
@@ -223,6 +227,9 @@
...
@@ -223,6 +227,9 @@
<if
test=
"copyId != null"
>
<if
test=
"copyId != null"
>
#{copyId,jdbcType=VARCHAR},
#{copyId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"dataFrom != null"
>
#{dataFrom,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
<if
test=
"content != null"
>
#{content,jdbcType=LONGVARBINARY},
#{content,jdbcType=LONGVARBINARY},
</if>
</if>
...
@@ -273,6 +280,9 @@
...
@@ -273,6 +280,9 @@
<if
test=
"record.copyId != null"
>
<if
test=
"record.copyId != null"
>
copy_id = #{record.copyId,jdbcType=VARCHAR},
copy_id = #{record.copyId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.dataFrom != null"
>
data_from = #{record.dataFrom,jdbcType=VARCHAR},
</if>
<if
test=
"record.content != null"
>
<if
test=
"record.content != null"
>
content = #{record.content,jdbcType=LONGVARBINARY},
content = #{record.content,jdbcType=LONGVARBINARY},
</if>
</if>
...
@@ -295,6 +305,7 @@
...
@@ -295,6 +305,7 @@
copy_from_view = #{record.copyFromView,jdbcType=VARCHAR},
copy_from_view = #{record.copyFromView,jdbcType=VARCHAR},
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
copy_id = #{record.copyId,jdbcType=VARCHAR},
copy_id = #{record.copyId,jdbcType=VARCHAR},
data_from = #{record.dataFrom,jdbcType=VARCHAR},
content = #{record.content,jdbcType=LONGVARBINARY}
content = #{record.content,jdbcType=LONGVARBINARY}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -313,7 +324,8 @@
...
@@ -313,7 +324,8 @@
copy_from_panel = #{record.copyFromPanel,jdbcType=VARCHAR},
copy_from_panel = #{record.copyFromPanel,jdbcType=VARCHAR},
copy_from_view = #{record.copyFromView,jdbcType=VARCHAR},
copy_from_view = #{record.copyFromView,jdbcType=VARCHAR},
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
copy_from = #{record.copyFrom,jdbcType=VARCHAR},
copy_id = #{record.copyId,jdbcType=VARCHAR}
copy_id = #{record.copyId,jdbcType=VARCHAR},
data_from = #{record.dataFrom,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -354,6 +366,9 @@
...
@@ -354,6 +366,9 @@
<if
test=
"copyId != null"
>
<if
test=
"copyId != null"
>
copy_id = #{copyId,jdbcType=VARCHAR},
copy_id = #{copyId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"dataFrom != null"
>
data_from = #{dataFrom,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
<if
test=
"content != null"
>
content = #{content,jdbcType=LONGVARBINARY},
content = #{content,jdbcType=LONGVARBINARY},
</if>
</if>
...
@@ -373,6 +388,7 @@
...
@@ -373,6 +388,7 @@
copy_from_view = #{copyFromView,jdbcType=VARCHAR},
copy_from_view = #{copyFromView,jdbcType=VARCHAR},
copy_from = #{copyFrom,jdbcType=VARCHAR},
copy_from = #{copyFrom,jdbcType=VARCHAR},
copy_id = #{copyId,jdbcType=VARCHAR},
copy_id = #{copyId,jdbcType=VARCHAR},
data_from = #{dataFrom,jdbcType=VARCHAR},
content = #{content,jdbcType=LONGVARBINARY}
content = #{content,jdbcType=LONGVARBINARY}
where id = #{id,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</update>
...
@@ -388,7 +404,8 @@
...
@@ -388,7 +404,8 @@
copy_from_panel = #{copyFromPanel,jdbcType=VARCHAR},
copy_from_panel = #{copyFromPanel,jdbcType=VARCHAR},
copy_from_view = #{copyFromView,jdbcType=VARCHAR},
copy_from_view = #{copyFromView,jdbcType=VARCHAR},
copy_from = #{copyFrom,jdbcType=VARCHAR},
copy_from = #{copyFrom,jdbcType=VARCHAR},
copy_id = #{copyId,jdbcType=VARCHAR}
copy_id = #{copyId,jdbcType=VARCHAR},
data_from = #{dataFrom,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</update>
</mapper>
</mapper>
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/ext/ExtPanelGroupExtendDataMapper.java
0 → 100644
浏览文件 @
9a8cc0c1
package
io
.
dataease
.
base
.
mapper
.
ext
;
import
io.dataease.dto.PanelGroupExtendDataDTO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
ExtPanelGroupExtendDataMapper
{
void
savePanelExtendData
(
@Param
(
"records"
)
List
<
PanelGroupExtendDataDTO
>
records
);
}
backend/src/main/java/io/dataease/base/mapper/ext/ExtPanelGroupExtendDataMapper.xml
0 → 100644
浏览文件 @
9a8cc0c1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.dataease.base.mapper.ext.ExtPanelGroupExtendDataMapper"
>
<insert
id =
"savePanelExtendData"
>
INSERT INTO `panel_group_extend_data` (id, panel_id,view_id,view_details) VALUES
<foreach
collection=
"records"
item=
"item"
index=
"index"
separator=
","
>
(uuid(),#{item.panelId},#{item.viewId},#{item.viewDetails})
</foreach>
</insert>
</mapper>
backend/src/main/java/io/dataease/commons/constants/PanelConstants.java
浏览文件 @
9a8cc0c1
...
@@ -33,5 +33,18 @@ public class PanelConstants {
...
@@ -33,5 +33,18 @@ public class PanelConstants {
public
final
static
String
PANEL_GATHER_PANEL_LIST
=
"panel_list"
;
public
final
static
String
PANEL_GATHER_PANEL_LIST
=
"panel_list"
;
//新建仪表板来源
public
static
final
class
NEW_PANEL_FROM
{
// 直接新建
public
static
final
String
NEW
=
"new"
;
// 内部模板新建
public
static
final
String
NEW_INNER_TEMPLATE
=
"new_inner_template"
;
// 外部模板新建
public
static
final
String
NEW_OUTER_TEMPLATE
=
"new_outer_template"
;
}
}
}
backend/src/main/java/io/dataease/controller/request/panel/PanelGroupRequest.java
浏览文件 @
9a8cc0c1
...
@@ -17,6 +17,13 @@ public class PanelGroupRequest extends PanelGroupDTO {
...
@@ -17,6 +17,13 @@ public class PanelGroupRequest extends PanelGroupDTO {
private
String
userId
;
private
String
userId
;
@ApiModelProperty
(
"操作类型"
)
@ApiModelProperty
(
"操作类型"
)
private
String
optType
;
private
String
optType
;
@ApiModelProperty
(
"新建来源"
)
private
String
newFrom
;
@ApiModelProperty
(
"模板动态数据"
)
private
String
dynamicData
;
@ApiModelProperty
(
"内部模板ID"
)
private
String
templateId
;
public
PanelGroupRequest
()
{
public
PanelGroupRequest
()
{
}
}
...
...
backend/src/main/java/io/dataease/dto/PanelGroupExtendDataDTO.java
0 → 100644
浏览文件 @
9a8cc0c1
package
io
.
dataease
.
dto
;
import
io.dataease.base.domain.PanelGroupExtendData
;
import
lombok.Data
;
import
org.pentaho.di.core.util.UUIDUtil
;
/**
* Author: wangjiahao
* Date: 2022/3/14
* Description:
*/
@Data
public
class
PanelGroupExtendDataDTO
extends
PanelGroupExtendData
{
public
PanelGroupExtendDataDTO
(
String
panelId
,
String
viewId
,
String
viewDetails
)
{
super
();
super
.
setId
(
UUIDUtil
.
getUUIDAsString
());
super
.
setPanelId
(
panelId
);
super
.
setViewId
(
viewId
);
super
.
setViewDetails
(
viewDetails
);
}
public
PanelGroupExtendDataDTO
()
{
super
();
}
}
backend/src/main/java/io/dataease/dto/panel/po/PanelViewInsertDTO.java
浏览文件 @
9a8cc0c1
...
@@ -24,5 +24,12 @@ public class PanelViewInsertDTO extends PanelView {
...
@@ -24,5 +24,12 @@ public class PanelViewInsertDTO extends PanelView {
super
.
setPanelId
(
panelGroupId
);
super
.
setPanelId
(
panelGroupId
);
super
.
setPosition
(
position
);
super
.
setPosition
(
position
);
}
}
public
PanelViewInsertDTO
(
String
chartViewId
,
String
panelGroupId
,
String
position
,
String
dataFrom
)
{
super
();
super
.
setChartViewId
(
chartViewId
);
super
.
setPanelId
(
panelGroupId
);
super
.
setPosition
(
position
);
super
.
setDataFrom
(
dataFrom
);
}
}
}
backend/src/main/java/io/dataease/service/panel/PanelGroupService.java
浏览文件 @
9a8cc0c1
...
@@ -3,10 +3,7 @@ package io.dataease.service.panel;
...
@@ -3,10 +3,7 @@ package io.dataease.service.panel;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.mapper.ChartViewMapper
;
import
io.dataease.base.mapper.*
;
import
io.dataease.base.mapper.PanelGroupMapper
;
import
io.dataease.base.mapper.PanelViewMapper
;
import
io.dataease.base.mapper.VAuthModelMapper
;
import
io.dataease.base.mapper.ext.*
;
import
io.dataease.base.mapper.ext.*
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.constants.PanelConstants
;
import
io.dataease.commons.constants.PanelConstants
;
...
@@ -16,16 +13,19 @@ import io.dataease.commons.utils.TreeUtils;
...
@@ -16,16 +13,19 @@ import io.dataease.commons.utils.TreeUtils;
import
io.dataease.controller.request.authModel.VAuthModelRequest
;
import
io.dataease.controller.request.authModel.VAuthModelRequest
;
import
io.dataease.controller.request.dataset.DataSetTableRequest
;
import
io.dataease.controller.request.dataset.DataSetTableRequest
;
import
io.dataease.controller.request.panel.PanelGroupRequest
;
import
io.dataease.controller.request.panel.PanelGroupRequest
;
import
io.dataease.dto.PanelGroupExtendDataDTO
;
import
io.dataease.dto.authModel.VAuthModelDTO
;
import
io.dataease.dto.authModel.VAuthModelDTO
;
import
io.dataease.dto.chart.ChartViewDTO
;
import
io.dataease.dto.chart.ChartViewDTO
;
import
io.dataease.dto.dataset.DataSetTableDTO
;
import
io.dataease.dto.dataset.DataSetTableDTO
;
import
io.dataease.dto.panel.PanelGroupDTO
;
import
io.dataease.dto.panel.PanelGroupDTO
;
import
io.dataease.dto.panel.linkJump.PanelLinkJumpBaseRequest
;
import
io.dataease.dto.panel.linkJump.PanelLinkJumpBaseRequest
;
import
io.dataease.dto.panel.po.PanelViewInsertDTO
;
import
io.dataease.exception.DataEaseException
;
import
io.dataease.exception.DataEaseException
;
import
io.dataease.i18n.Translator
;
import
io.dataease.i18n.Translator
;
import
io.dataease.service.chart.ChartViewService
;
import
io.dataease.service.chart.ChartViewService
;
import
io.dataease.service.dataset.DataSetTableService
;
import
io.dataease.service.dataset.DataSetTableService
;
import
io.dataease.service.sys.SysAuthService
;
import
io.dataease.service.sys.SysAuthService
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.pentaho.di.core.util.UUIDUtil
;
import
org.pentaho.di.core.util.UUIDUtil
;
...
@@ -85,6 +85,10 @@ public class PanelGroupService {
...
@@ -85,6 +85,10 @@ public class PanelGroupService {
private
ExtDataSetTableMapper
extDataSetTableMapper
;
private
ExtDataSetTableMapper
extDataSetTableMapper
;
@Resource
@Resource
private
DataSetTableService
dataSetTableService
;
private
DataSetTableService
dataSetTableService
;
@Resource
private
PanelTemplateMapper
templateMapper
;
@Resource
private
ExtPanelGroupExtendDataMapper
extPanelGroupExtendDataMapper
;
public
List
<
PanelGroupDTO
>
tree
(
PanelGroupRequest
panelGroupRequest
)
{
public
List
<
PanelGroupDTO
>
tree
(
PanelGroupRequest
panelGroupRequest
)
{
...
@@ -105,17 +109,13 @@ public class PanelGroupService {
...
@@ -105,17 +109,13 @@ public class PanelGroupService {
// @Transactional
// @Transactional
public
PanelGroup
saveOrUpdate
(
PanelGroupRequest
request
)
{
public
PanelGroup
saveOrUpdate
(
PanelGroupRequest
request
)
{
String
panelId
=
request
.
getId
();
String
panelId
=
request
.
getId
();
List
<
String
>
viewIds
=
null
;
if
(
StringUtils
.
isNotEmpty
(
panelId
)){
if
(
StringUtils
.
isNotEmpty
(
panelId
)){
viewIds
=
panelViewService
.
syncPanelViews
(
request
);
panelViewService
.
syncPanelViews
(
request
);
}
}
if
(
StringUtils
.
isEmpty
(
panelId
))
{
if
(
StringUtils
.
isEmpty
(
panelId
))
{
// 新建
// 新建
checkPanelName
(
request
.
getName
(),
request
.
getPid
(),
PanelConstants
.
OPT_TYPE_INSERT
,
null
,
request
.
getNodeType
());
checkPanelName
(
request
.
getName
(),
request
.
getPid
(),
PanelConstants
.
OPT_TYPE_INSERT
,
null
,
request
.
getNodeType
());
panelId
=
UUID
.
randomUUID
().
toString
();
panelId
=
newPanel
(
request
);
request
.
setId
(
panelId
);
request
.
setCreateTime
(
System
.
currentTimeMillis
());
request
.
setCreateBy
(
AuthUtils
.
getUser
().
getUsername
());
panelGroupMapper
.
insert
(
request
);
panelGroupMapper
.
insert
(
request
);
}
else
if
(
"toDefaultPanel"
.
equals
(
request
.
getOptType
()))
{
}
else
if
(
"toDefaultPanel"
.
equals
(
request
.
getOptType
()))
{
panelId
=
UUID
.
randomUUID
().
toString
();
panelId
=
UUID
.
randomUUID
().
toString
();
...
@@ -164,9 +164,6 @@ public class PanelGroupService {
...
@@ -164,9 +164,6 @@ public class PanelGroupService {
if
(!
CollectionUtils
.
isNotEmpty
(
panelGroupDTOList
))
{
if
(!
CollectionUtils
.
isNotEmpty
(
panelGroupDTOList
))
{
DataEaseException
.
throwException
(
"未查询到用户对应的资源权限,请尝试刷新重新保存"
);
DataEaseException
.
throwException
(
"未查询到用户对应的资源权限,请尝试刷新重新保存"
);
}
}
//移除没有用到的仪表板私有视图
extPanelGroupMapper
.
removeUselessViews
(
panelId
,
viewIds
);
return
panelGroupDTOList
.
get
(
0
);
return
panelGroupDTOList
.
get
(
0
);
}
}
...
@@ -303,6 +300,53 @@ public class PanelGroupService {
...
@@ -303,6 +300,53 @@ public class PanelGroupService {
return
newPanelId
;
return
newPanelId
;
}
}
public
String
newPanel
(
PanelGroupRequest
request
){
String
newPanelId
=
UUIDUtil
.
getUUIDAsString
();
String
newFrom
=
request
.
getNewFrom
();
String
templateStyle
=
null
;
String
templateData
=
null
;
String
dynamicData
=
null
;
if
(
PanelConstants
.
NEW_PANEL_FROM
.
NEW
.
equals
(
newFrom
)){
}
else
{
//内部模板新建
if
(
PanelConstants
.
NEW_PANEL_FROM
.
NEW_INNER_TEMPLATE
.
equals
(
newFrom
)){
PanelTemplateWithBLOBs
panelTemplate
=
templateMapper
.
selectByPrimaryKey
(
request
.
getTemplateId
());
templateStyle
=
panelTemplate
.
getTemplateStyle
();
templateData
=
panelTemplate
.
getTemplateData
();
dynamicData
=
panelTemplate
.
getDynamicData
();
}
else
if
(
PanelConstants
.
NEW_PANEL_FROM
.
NEW_OUTER_TEMPLATE
.
equals
(
newFrom
)){
templateStyle
=
request
.
getPanelStyle
();
templateData
=
request
.
getPanelData
();
dynamicData
=
request
.
getDynamicData
();
}
Map
<
String
,
String
>
dynamicDataMap
=
JSON
.
parseObject
(
dynamicData
,
Map
.
class
);
List
<
PanelViewInsertDTO
>
panelViews
=
new
ArrayList
<>();
List
<
PanelGroupExtendDataDTO
>
viewsData
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
String
>
entry
:
dynamicDataMap
.
entrySet
()){
String
originViewId
=
entry
.
getKey
();
String
originViewData
=
entry
.
getValue
();
String
position
=
JSON
.
parseObject
(
originViewData
).
getString
(
"position"
);
String
newViewId
=
UUIDUtil
.
getUUIDAsString
();
//TODO 数据处理 1.替换viewId 2.加入panelView 数据(数据来源为template) 3.加入模板view data数据
templateData
=
templateData
.
replaceAll
(
originViewId
,
newViewId
);
panelViews
.
add
(
new
PanelViewInsertDTO
(
newViewId
,
newPanelId
,
position
,
"template"
));
viewsData
.
add
(
new
PanelGroupExtendDataDTO
(
newPanelId
,
newViewId
,
originViewData
));
}
if
(
CollectionUtils
.
isNotEmpty
(
panelViews
)){
extPanelViewMapper
.
savePanelView
(
panelViews
);
}
if
(
CollectionUtils
.
isNotEmpty
(
viewsData
)){
extPanelGroupExtendDataMapper
.
savePanelExtendData
(
viewsData
);
}
request
.
setPanelData
(
templateData
);
request
.
setPanelStyle
(
templateStyle
);
}
request
.
setId
(
newPanelId
);
request
.
setCreateTime
(
System
.
currentTimeMillis
());
request
.
setCreateBy
(
AuthUtils
.
getUser
().
getUsername
());
return
newPanelId
;
}
public
void
sysInit1HistoryPanel
()
{
public
void
sysInit1HistoryPanel
()
{
LogUtil
.
info
(
"=====v1.8版本 仪表板私有化【开始】====="
);
LogUtil
.
info
(
"=====v1.8版本 仪表板私有化【开始】====="
);
...
...
backend/src/main/java/io/dataease/service/panel/PanelViewService.java
浏览文件 @
9a8cc0c1
...
@@ -8,6 +8,7 @@ import io.dataease.base.domain.PanelView;
...
@@ -8,6 +8,7 @@ import io.dataease.base.domain.PanelView;
import
io.dataease.base.domain.PanelViewExample
;
import
io.dataease.base.domain.PanelViewExample
;
import
io.dataease.base.mapper.PanelViewMapper
;
import
io.dataease.base.mapper.PanelViewMapper
;
import
io.dataease.base.mapper.ext.ExtChartViewMapper
;
import
io.dataease.base.mapper.ext.ExtChartViewMapper
;
import
io.dataease.base.mapper.ext.ExtPanelGroupMapper
;
import
io.dataease.base.mapper.ext.ExtPanelViewMapper
;
import
io.dataease.base.mapper.ext.ExtPanelViewMapper
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.BeanUtils
;
...
@@ -43,6 +44,8 @@ public class PanelViewService {
...
@@ -43,6 +44,8 @@ public class PanelViewService {
@Resource
@Resource
private
ExtChartViewMapper
extChartViewMapper
;
private
ExtChartViewMapper
extChartViewMapper
;
private
ExtPanelGroupMapper
extPanelGroupMapper
;
private
final
static
String
SCENE_TYPE
=
"scene"
;
private
final
static
String
SCENE_TYPE
=
"scene"
;
public
List
<
PanelViewDto
>
groups
()
{
public
List
<
PanelViewDto
>
groups
()
{
...
@@ -127,6 +130,8 @@ public class PanelViewService {
...
@@ -127,6 +130,8 @@ public class PanelViewService {
}
}
}
}
panelGroup
.
setMobileLayout
(
mobileLayout
);
panelGroup
.
setMobileLayout
(
mobileLayout
);
//移除没有用到的仪表板私有视图
extPanelGroupMapper
.
removeUselessViews
(
panelId
,
viewIds
);
return
viewIds
;
return
viewIds
;
}
}
...
...
backend/src/main/resources/db/migration/V33__1.9.sql
浏览文件 @
9a8cc0c1
...
@@ -33,3 +33,38 @@ CREATE TABLE `chart_view_cache` (
...
@@ -33,3 +33,38 @@ CREATE TABLE `chart_view_cache` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
ALTER
TABLE
`panel_view`
ADD
COLUMN
`data_from`
varchar
(
255
)
NULL
DEFAULT
'chart'
COMMENT
'当前数据来源 chart 视图 template 模板'
AFTER
`copy_id`
;
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for panel_group_extend
-- ----------------------------
DROP
TABLE
IF
EXISTS
`panel_group_extend`
;
CREATE
TABLE
`panel_group_extend`
(
`id`
varchar
(
50
)
NOT
NULL
,
`panel_id`
varchar
(
50
)
DEFAULT
NULL
,
`template_id`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'模板来源id'
,
`template_dynamic_data`
longtext
COMMENT
'模板动态数据'
,
`template_version`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'模板版本号(预留)'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for panel_group_extend_data
-- ----------------------------
DROP
TABLE
IF
EXISTS
`panel_group_extend_data`
;
CREATE
TABLE
`panel_group_extend_data`
(
`id`
varchar
(
50
)
NOT
NULL
,
`panel_id`
varchar
(
50
)
DEFAULT
NULL
,
`view_id`
varchar
(
50
)
DEFAULT
NULL
,
`view_details`
longtext
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
1
;
backend/src/main/resources/generatorConfig.xml
浏览文件 @
9a8cc0c1
...
@@ -60,11 +60,13 @@
...
@@ -60,11 +60,13 @@
</javaClientGenerator>
</javaClientGenerator>
<!--要生成的数据库表 -->
<!--要生成的数据库表 -->
<table
tableName=
"panel_group_extend"
/>
<table
tableName=
"panel_group_extend_data"
/>
<!-- <table tableName="dataease_code_version"/>-->
<!-- <table tableName="dataease_code_version"/>-->
<!-- <table tableName="chart_view"/>-->
<!-- <table tableName="chart_view"/>-->
<table
tableName=
"chart_view_cache"
/
>
<!-- <table tableName="chart_view_cache"/>--
>
<!-- <table tableName="chart_view"/>-->
<!-- <table tableName="chart_view"/>-->
<!-- <table tableName="panel_view"/>--
>
<table
tableName=
"panel_view"
/
>
<!-- <table tableName="panel_link_jump"/>-->
<!-- <table tableName="panel_link_jump"/>-->
<!-- <table tableName="panel_link_jump_info"/>-->
<!-- <table tableName="panel_link_jump_info"/>-->
<!-- <table tableName="panel_link_jump_target_view_info"/>-->
<!-- <table tableName="panel_link_jump_target_view_info"/>-->
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
9a8cc0c1
...
@@ -269,7 +269,8 @@ export default {
...
@@ -269,7 +269,8 @@ export default {
'publicLinkStatus'
,
'publicLinkStatus'
,
'previewCanvasScale'
,
'previewCanvasScale'
,
'mobileLayoutStatus'
,
'mobileLayoutStatus'
,
'componentData'
'componentData'
,
'panelViewDetailsInfo'
])
])
},
},
...
@@ -450,6 +451,9 @@ export default {
...
@@ -450,6 +451,9 @@ export default {
// 将视图传入echart组件
// 将视图传入echart组件
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
chart
=
response
.
data
this
.
chart
=
response
.
data
this
.
chart
[
'position'
]
=
this
.
inTab
?
'tab'
:
'panel'
// 记录当前数据
this
.
panelViewDetailsInfo
[
id
]
=
JSON
.
stringify
(
this
.
chart
)
this
.
sourceCustomAttrStr
=
this
.
chart
.
customAttr
this
.
sourceCustomAttrStr
=
this
.
chart
.
customAttr
this
.
sourceCustomStyleStr
=
this
.
chart
.
customStyle
this
.
sourceCustomStyleStr
=
this
.
chart
.
customStyle
this
.
chart
.
drillFields
=
this
.
chart
.
drillFields
?
JSON
.
parse
(
this
.
chart
.
drillFields
)
:
[]
this
.
chart
.
drillFields
=
this
.
chart
.
drillFields
?
JSON
.
parse
(
this
.
chart
.
drillFields
)
:
[]
...
...
frontend/src/store/index.js
浏览文件 @
9a8cc0c1
...
@@ -101,7 +101,9 @@ const data = {
...
@@ -101,7 +101,9 @@ const data = {
},
},
scrollAutoMove
:
0
,
scrollAutoMove
:
0
,
// 视图是否编辑记录
// 视图是否编辑记录
panelViewEditInfo
:
{}
panelViewEditInfo
:
{},
// 仪表板视图明细
panelViewDetailsInfo
:
{}
},
},
mutations
:
{
mutations
:
{
...
animation
.
mutations
,
...
animation
.
mutations
,
...
...
frontend/src/views/panel/list/EditPanel/index.vue
浏览文件 @
9a8cc0c1
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
<el-row
v-loading=
"loading"
>
<el-row
v-loading=
"loading"
>
<el-row
v-if=
"editPanel.optType==='new' && editPanel.panelInfo.nodeType==='panel'"
>
<el-row
v-if=
"editPanel.optType==='new' && editPanel.panelInfo.nodeType==='panel'"
>
<el-col
:span=
"18"
style=
"height: 40px"
>
<el-col
:span=
"18"
style=
"height: 40px"
>
<el-radio
v-model=
"inputType"
label=
"
self
"
>
{{
$t
(
'panel.custom'
)
}}
</el-radio>
<el-radio
v-model=
"inputType"
label=
"
new
"
>
{{
$t
(
'panel.custom'
)
}}
</el-radio>
<!--
<el-radio
v-model=
"inputType"
label=
"
import
"
>
{{
$t
(
'panel.import_template'
)
}}
</el-radio>
-->
<!--
<el-radio
v-model=
"inputType"
label=
"
new_outer_template
"
>
{{
$t
(
'panel.import_template'
)
}}
</el-radio>
-->
<el-radio
v-model=
"inputType"
label=
"
copy
"
@
click
.
native=
"getTree"
>
{{
$t
(
'panel.copy_template'
)
}}
</el-radio>
<el-radio
v-model=
"inputType"
label=
"
new_inner_template
"
@
click
.
native=
"getTree"
>
{{
$t
(
'panel.copy_template'
)
}}
</el-radio>
</el-col>
</el-col>
<el-col
v-if=
"inputType==='
import
'"
:span=
"6"
>
<el-col
v-if=
"inputType==='
new_outer_template
'"
:span=
"6"
>
<el-button
class=
"el-icon-upload"
size=
"small"
type=
"primary"
@
click=
"goFile"
>
{{
$t
(
'panel.upload_template'
)
}}
</el-button>
<el-button
class=
"el-icon-upload"
size=
"small"
type=
"primary"
@
click=
"goFile"
>
{{
$t
(
'panel.upload_template'
)
}}
</el-button>
<input
id=
"input"
ref=
"files"
type=
"file"
accept=
".DE"
hidden
@
change=
"handleFileChange"
>
<input
id=
"input"
ref=
"files"
type=
"file"
accept=
".DE
T
"
hidden
@
change=
"handleFileChange"
>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
style=
"margin-top: 5px"
>
<el-row
style=
"margin-top: 5px"
>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<el-input
v-model=
"editPanel.panelInfo.name"
clearable
size=
"mini"
/>
<el-input
v-model=
"editPanel.panelInfo.name"
clearable
size=
"mini"
/>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-if=
"inputType==='
copy
'"
class=
"preview"
>
<el-row
v-if=
"inputType==='
new_inner_template
'"
class=
"preview"
>
<el-col
:span=
"8"
style=
"height:100%;overflow-y: auto"
>
<el-col
:span=
"8"
style=
"height:100%;overflow-y: auto"
>
<template-all-list
:template-list=
"templateList"
@
showCurrentTemplateInfo=
"showCurrentTemplateInfo"
/>
<template-all-list
:template-list=
"templateList"
@
showCurrentTemplateInfo=
"showCurrentTemplateInfo"
/>
</el-col>
</el-col>
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
loading
:
false
,
inputType
:
'
self
'
,
inputType
:
'
new
'
,
fieldName
:
'name'
,
fieldName
:
'name'
,
tableRadio
:
null
,
tableRadio
:
null
,
keyWordSearch
:
''
,
keyWordSearch
:
''
,
...
@@ -73,13 +73,14 @@ export default {
...
@@ -73,13 +73,14 @@ export default {
},
},
watch
:
{
watch
:
{
inputType
(
newVal
)
{
inputType
(
newVal
)
{
if
(
newVal
===
'
self
'
)
{
if
(
newVal
===
'
new
'
)
{
this
.
editPanel
=
deepCopy
(
this
.
editPanelOut
)
this
.
editPanel
=
deepCopy
(
this
.
editPanelOut
)
}
else
{
}
else
{
this
.
editPanel
.
panelInfo
.
name
=
null
this
.
editPanel
.
panelInfo
.
name
=
null
this
.
editPanel
.
panelInfo
.
panelStyle
=
null
this
.
editPanel
.
panelInfo
.
panelStyle
=
null
this
.
editPanel
.
panelInfo
.
panelData
=
null
this
.
editPanel
.
panelInfo
.
panelData
=
null
this
.
importTemplateInfo
.
snapshot
=
null
this
.
importTemplateInfo
.
snapshot
=
null
this
.
editPanel
.
panelInfo
.
templateId
=
null
}
}
}
}
},
},
...
@@ -107,9 +108,10 @@ export default {
...
@@ -107,9 +108,10 @@ export default {
document
.
removeEventListener
(
'keypress'
,
this
.
entryKey
)
document
.
removeEventListener
(
'keypress'
,
this
.
entryKey
)
},
},
showCurrentTemplateInfo
(
data
)
{
showCurrentTemplateInfo
(
data
)
{
this
.
editPanel
.
panelInfo
.
templateId
=
data
.
id
this
.
editPanel
.
panelInfo
.
name
=
data
.
name
this
.
editPanel
.
panelInfo
.
name
=
data
.
name
this
.
editPanel
.
panelInfo
.
panelStyle
=
data
.
templateStyle
//
this.editPanel.panelInfo.panelStyle = data.templateStyle
this
.
editPanel
.
panelInfo
.
panelData
=
data
.
templateData
//
this.editPanel.panelInfo.panelData = data.templateData
this
.
importTemplateInfo
.
snapshot
=
data
.
snapshot
this
.
importTemplateInfo
.
snapshot
=
data
.
snapshot
},
},
getTree
()
{
getTree
()
{
...
@@ -139,10 +141,11 @@ export default {
...
@@ -139,10 +141,11 @@ export default {
return
false
return
false
}
}
if
(
!
this
.
editPanel
.
panelInfo
.
panelData
&&
this
.
editPanel
.
optType
===
'new'
&&
this
.
inputType
===
'copy
'
)
{
if
(
!
this
.
editPanel
.
panelInfo
.
templateId
&&
this
.
editPanel
.
optType
===
'new'
&&
this
.
inputType
===
'new_inner_template
'
)
{
this
.
$warning
(
this
.
$t
(
'chart.template_can_not_empty'
))
this
.
$warning
(
this
.
$t
(
'chart.template_can_not_empty'
))
return
false
return
false
}
}
this
.
editPanel
.
panelInfo
[
'newFrom'
]
=
this
.
inputType
panelSave
(
this
.
editPanel
.
panelInfo
).
then
(
response
=>
{
panelSave
(
this
.
editPanel
.
panelInfo
).
then
(
response
=>
{
this
.
$message
({
this
.
$message
({
message
:
this
.
$t
(
'commons.save_success'
),
message
:
this
.
$t
(
'commons.save_success'
),
...
...
frontend/src/views/panel/list/PanelViewShow.vue
浏览文件 @
9a8cc0c1
...
@@ -187,7 +187,8 @@ export default {
...
@@ -187,7 +187,8 @@ export default {
},
},
...
mapState
([
...
mapState
([
'componentData'
,
'componentData'
,
'canvasStyleData'
'canvasStyleData'
,
'panelViewDetailsInfo'
])
])
},
},
watch
:
{
watch
:
{
...
@@ -246,7 +247,7 @@ export default {
...
@@ -246,7 +247,7 @@ export default {
nodeType
:
'template'
,
nodeType
:
'template'
,
level
:
1
,
level
:
1
,
pid
:
null
,
pid
:
null
,
dynamicData
:
''
dynamicData
:
JSON
.
stringify
(
this
.
panelViewDetailsInfo
)
}
}
}
}
})
})
...
@@ -265,10 +266,10 @@ export default {
...
@@ -265,10 +266,10 @@ export default {
snapshot
:
snapshot
,
snapshot
:
snapshot
,
panelStyle
:
JSON
.
stringify
(
this
.
canvasStyleData
),
panelStyle
:
JSON
.
stringify
(
this
.
canvasStyleData
),
panelData
:
JSON
.
stringify
(
this
.
componentData
),
panelData
:
JSON
.
stringify
(
this
.
componentData
),
dynamicData
:
''
dynamicData
:
JSON
.
stringify
(
this
.
panelViewDetailsInfo
)
}
}
const
blob
=
new
Blob
([
JSON
.
stringify
(
this
.
templateInfo
)],
{
type
:
''
})
const
blob
=
new
Blob
([
JSON
.
stringify
(
this
.
templateInfo
)],
{
type
:
''
})
FileSaver
.
saveAs
(
blob
,
this
.
$store
.
state
.
panel
.
panelInfo
.
name
+
'-TEMPLATE.DE'
)
FileSaver
.
saveAs
(
blob
,
this
.
$store
.
state
.
panel
.
panelInfo
.
name
+
'-TEMPLATE.DE
T
'
)
}
}
})
})
},
50
)
},
50
)
...
...
frontend/src/views/panel/template/component/TemplateImport.vue
浏览文件 @
9a8cc0c1
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
>
<el-button
style=
"margin-left: 10px"
class=
"el-icon-upload"
size=
"small"
type=
"primary"
@
click=
"goFile"
>
{{
$t
(
'panel.upload_template'
)
}}
</el-button>
<el-button
style=
"margin-left: 10px"
class=
"el-icon-upload"
size=
"small"
type=
"primary"
@
click=
"goFile"
>
{{
$t
(
'panel.upload_template'
)
}}
</el-button>
<input
id=
"input"
ref=
"files"
type=
"file"
accept=
".DE"
hidden
@
change=
"handleFileChange"
>
<input
id=
"input"
ref=
"files"
type=
"file"
accept=
".DE
T
"
hidden
@
change=
"handleFileChange"
>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
class=
"preview"
:style=
"classBackground"
/>
<el-row
class=
"preview"
:style=
"classBackground"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论