Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
224deec0
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1433
Star
162
Fork
130
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
224deec0
编写于
4月 06, 2024
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 报表布局修改
上级
400acfd6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
17 deletion
+25
-17
report/src/main/resources/template/assets/report/js/skyeyeReportDesigner.js
...sources/template/assets/report/js/skyeyeReportDesigner.js
+20
-15
report/src/main/resources/template/js/reportPage/reportPageShow.js
...c/main/resources/template/js/reportPage/reportPageShow.js
+5
-2
未找到文件。
report/src/main/resources/template/assets/report/js/skyeyeReportDesigner.js
浏览文件 @
224deec0
...
@@ -48,11 +48,11 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
...
@@ -48,11 +48,11 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
// 图表自定义属性
// 图表自定义属性
var
echartsCustomOptions
=
{
var
echartsCustomOptions
=
{
"
custom.dataBaseMation
"
:
{
"
value
"
:
""
,
"
edit
"
:
1
,
"
remark
"
:
"
数据来源
"
,
"
name
"
:
"
数据来源
"
,
"
editor
"
:
"
99
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
数据源
"
},
"
custom.dataBaseMation
"
:
{
"
value
"
:
""
,
"
edit
"
:
1
,
"
remark
"
:
"
数据来源
"
,
"
name
"
:
"
数据来源
"
,
"
editor
Type
"
:
"
99
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
数据源
"
},
"
custom.move.x
"
:
{
"
value
"
:
"
0
"
,
"
edit
"
:
1
,
"
remark
"
:
"
鼠标拖动距离左侧的像素
"
,
"
name
"
:
"
X坐标
"
,
"
editor
"
:
"
98
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
坐标
"
},
"
custom.move.x
"
:
{
"
value
"
:
"
0
"
,
"
edit
"
:
1
,
"
remark
"
:
"
鼠标拖动距离左侧的像素
"
,
"
name
"
:
"
X坐标
"
,
"
editor
Type
"
:
"
98
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
坐标
"
},
"
custom.move.y
"
:
{
"
value
"
:
"
0
"
,
"
edit
"
:
1
,
"
remark
"
:
"
鼠标拖动距离顶部的像素
"
,
"
name
"
:
"
Y坐标
"
,
"
editor
"
:
"
98
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
坐标
"
},
"
custom.move.y
"
:
{
"
value
"
:
"
0
"
,
"
edit
"
:
1
,
"
remark
"
:
"
鼠标拖动距离顶部的像素
"
,
"
name
"
:
"
Y坐标
"
,
"
editor
Type
"
:
"
98
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
坐标
"
},
"
custom.box.background
"
:
{
"
value
"
:
"
rgba(255, 255, 255, 1)
"
,
"
edit
"
:
1
,
"
remark
"
:
"
盒子背景
"
,
"
name
"
:
"
盒子背景颜色
"
,
"
editor
"
:
"
3
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
盒子
"
},
"
custom.box.background
"
:
{
"
value
"
:
"
rgba(255, 255, 255, 1)
"
,
"
edit
"
:
1
,
"
remark
"
:
"
盒子背景
"
,
"
name
"
:
"
盒子背景颜色
"
,
"
editor
Type
"
:
"
3
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
盒子
"
},
"
custom.box.border-color
"
:
{
"
value
"
:
"
rgba(255, 255, 255, 1)
"
,
"
edit
"
:
1
,
"
remark
"
:
"
盒子边框
"
,
"
name
"
:
"
盒子边框颜色
"
,
"
editor
"
:
"
3
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
盒子
"
}
"
custom.box.border-color
"
:
{
"
value
"
:
"
rgba(255, 255, 255, 1)
"
,
"
edit
"
:
1
,
"
remark
"
:
"
盒子边框
"
,
"
name
"
:
"
盒子边框颜色
"
,
"
editor
Type
"
:
"
3
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
盒子
"
}
};
};
var
f
=
{
var
f
=
{
...
@@ -279,6 +279,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
...
@@ -279,6 +279,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
var
wordId
=
f
.
getWordBox
(
boxId
,
modelId
,
styleStr
,
wordStyleMation
);
var
wordId
=
f
.
getWordBox
(
boxId
,
modelId
,
styleStr
,
wordStyleMation
);
// 加入页面属性
// 加入页面属性
wordStyleMation
.
attr
=
$
.
extend
(
true
,
{},
echartsCustomOptions
,
wordStyleMation
.
attr
);
wordStyleMation
.
attr
=
$
.
extend
(
true
,
{},
echartsCustomOptions
,
wordStyleMation
.
attr
);
wordStyleMation
.
attr
[
wordStyleMation
.
customAttr
.
attrCode
]
=
wordStyleMation
.
customAttr
inPageWordMation
[
boxId
]
=
$
.
extend
(
true
,
{},
wordStyleMation
);
inPageWordMation
[
boxId
]
=
$
.
extend
(
true
,
{},
wordStyleMation
);
return
boxId
;
return
boxId
;
},
},
...
@@ -329,7 +330,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
...
@@ -329,7 +330,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
var
wordBox
=
document
.
createElement
(
"
font
"
);
var
wordBox
=
document
.
createElement
(
"
font
"
);
// 为div设置类名
// 为div设置类名
wordBox
.
className
=
"
word-box
"
;
wordBox
.
className
=
"
word-box
"
;
wordBox
.
innerHTML
=
wordStyleMation
[
"
customAttr
"
].
v
alue
;
wordBox
.
innerHTML
=
wordStyleMation
[
"
customAttr
"
].
defaultV
alue
;
wordBox
.
style
=
styleStr
;
wordBox
.
style
=
styleStr
;
wordBox
.
id
=
wordId
;
wordBox
.
id
=
wordId
;
var
box
=
f
.
createBox
(
boxId
,
modelId
,
f
.
setDesignAttr
(
wordStyleMation
));
var
box
=
f
.
createBox
(
boxId
,
modelId
,
f
.
setDesignAttr
(
wordStyleMation
));
...
@@ -692,7 +693,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
...
@@ -692,7 +693,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
$
.
each
(
attr
,
function
(
key
,
val
)
{
$
.
each
(
attr
,
function
(
key
,
val
)
{
if
(
val
.
edit
==
1
)
{
if
(
val
.
edit
==
1
)
{
// 可以编辑
// 可以编辑
var
formItem
=
editorType
[
val
.
editorType
||
val
.
editor
];
var
formItem
=
editorType
[
val
.
editorType
];
if
(
!
f
.
isNull
(
formItem
))
{
if
(
!
f
.
isNull
(
formItem
))
{
// 如果表单类型中支持的编辑器类型存在,则去解析
// 如果表单类型中支持的编辑器类型存在,则去解析
var
data
=
f
.
getFormItemData
(
key
,
val
,
boxId
,
indexNumber
);
var
data
=
f
.
getFormItemData
(
key
,
val
,
boxId
,
indexNumber
);
...
@@ -762,7 +763,11 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
...
@@ -762,7 +763,11 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
// 将echarts的数据格式转化为form表单的数据格式
// 将echarts的数据格式转化为form表单的数据格式
getEditorChooseValue
:
function
(
val
,
boxId
,
indexNumber
)
{
getEditorChooseValue
:
function
(
val
,
boxId
,
indexNumber
)
{
if
(
val
.
editorType
==
"
9
"
)
{
if
(
val
.
editorType
==
"
9
"
)
{
val
.
optionalValue
=
inPageEcharts
[
boxId
].
attr
[
"
custom.dataBaseMation
"
].
defaultValue
.
analysisData
;
if
(
isNull
(
inPageEcharts
[
boxId
].
attr
[
"
custom.dataBaseMation
"
].
defaultValue
))
{
val
.
optionalValue
=
[]
}
else
{
val
.
optionalValue
=
inPageEcharts
[
boxId
].
attr
[
"
custom.dataBaseMation
"
].
defaultValue
.
analysisData
;
}
}
}
var
editorChooseValue
=
[]
var
editorChooseValue
=
[]
if
(
isJSON
(
val
.
optionalValue
))
{
if
(
isJSON
(
val
.
optionalValue
))
{
...
@@ -784,7 +789,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
...
@@ -784,7 +789,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
if
(
isJSON
(
val
.
defaultValue
))
{
if
(
isJSON
(
val
.
defaultValue
))
{
value
=
JSON
.
parse
(
val
.
defaultValue
);
value
=
JSON
.
parse
(
val
.
defaultValue
);
}
}
if
(
val
.
editor
==
'
2
'
)
{
if
(
val
.
editor
Type
==
'
2
'
)
{
// 编辑器类型为数据框:如果是数组,则需要转成json串
// 编辑器类型为数据框:如果是数组,则需要转成json串
if
(
value
instanceof
Array
)
{
if
(
value
instanceof
Array
)
{
value
=
JSON
.
stringify
(
value
);
value
=
JSON
.
stringify
(
value
);
...
@@ -878,10 +883,10 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
...
@@ -878,10 +883,10 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
var
wordMationList
=
params
.
initData
.
wordMationList
;
var
wordMationList
=
params
.
initData
.
wordMationList
;
if
(
!
f
.
isNull
(
wordMationList
))
{
if
(
!
f
.
isNull
(
wordMationList
))
{
$
.
each
(
wordMationList
,
function
(
i
,
item
)
{
$
.
each
(
wordMationList
,
function
(
i
,
item
)
{
var
leftNum
=
multiplication
(
item
.
attrMation
.
attr
[
"
custom.move.x
"
].
v
alue
,
widthScale
);
var
leftNum
=
multiplication
(
item
.
attrMation
.
attr
[
"
custom.move.x
"
].
defaultV
alue
,
widthScale
);
var
topNum
=
multiplication
(
item
.
attrMation
.
attr
[
"
custom.move.y
"
].
v
alue
,
heightScale
);
var
topNum
=
multiplication
(
item
.
attrMation
.
attr
[
"
custom.move.y
"
].
defaultV
alue
,
heightScale
);
item
.
attrMation
.
attr
[
"
custom.move.x
"
].
v
alue
=
leftNum
;
item
.
attrMation
.
attr
[
"
custom.move.x
"
].
defaultV
alue
=
leftNum
;
item
.
attrMation
.
attr
[
"
custom.move.y
"
].
v
alue
=
topNum
;
item
.
attrMation
.
attr
[
"
custom.move.y
"
].
defaultV
alue
=
topNum
;
var
boxId
=
f
.
addNewWordModel
(
item
.
modelId
,
item
.
attrMation
);
var
boxId
=
f
.
addNewWordModel
(
item
.
modelId
,
item
.
attrMation
);
$
(
"
#
"
+
boxId
).
css
({
$
(
"
#
"
+
boxId
).
css
({
left
:
leftNum
+
"
px
"
,
left
:
leftNum
+
"
px
"
,
...
@@ -889,8 +894,8 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
...
@@ -889,8 +894,8 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
width
:
multiplication
(
item
.
width
,
widthScale
),
width
:
multiplication
(
item
.
width
,
widthScale
),
height
:
multiplication
(
item
.
height
,
heightScale
)
height
:
multiplication
(
item
.
height
,
heightScale
)
});
});
setBoxAttrMation
(
"
custom.box.background
"
,
boxId
,
item
.
attrMation
.
attr
[
"
custom.box.background
"
].
v
alue
);
setBoxAttrMation
(
"
custom.box.background
"
,
boxId
,
item
.
attrMation
.
attr
[
"
custom.box.background
"
].
defaultV
alue
);
setBoxAttrMation
(
"
custom.box.border-color
"
,
boxId
,
item
.
attrMation
.
attr
[
"
custom.box.border-color
"
].
v
alue
);
setBoxAttrMation
(
"
custom.box.border-color
"
,
boxId
,
item
.
attrMation
.
attr
[
"
custom.box.border-color
"
].
defaultV
alue
);
});
});
}
}
},
},
...
...
report/src/main/resources/template/js/reportPage/reportPageShow.js
浏览文件 @
224deec0
...
@@ -88,6 +88,9 @@ layui.config({
...
@@ -88,6 +88,9 @@ layui.config({
}
}
function
getDataFromRest
(
attr
)
{
function
getDataFromRest
(
attr
)
{
if
(
isNull
(
attr
[
'
custom.dataBaseMation
'
].
defaultValue
))
{
return
attr
;
}
var
fromId
=
attr
[
'
custom.dataBaseMation
'
].
defaultValue
.
id
;
var
fromId
=
attr
[
'
custom.dataBaseMation
'
].
defaultValue
.
id
;
var
needGetData
=
{};
var
needGetData
=
{};
$
.
each
(
attr
,
function
(
key
,
value
)
{
$
.
each
(
attr
,
function
(
key
,
value
)
{
...
@@ -143,7 +146,7 @@ layui.config({
...
@@ -143,7 +146,7 @@ layui.config({
// 加载文字模型
// 加载文字模型
function
addNewWordModel
(
modelId
,
wordStyleMation
)
{
function
addNewWordModel
(
modelId
,
wordStyleMation
)
{
var
styleStr
=
getWordStyleStr
(
wordStyleMation
.
attr
);
var
styleStr
=
getWordStyleStr
(
wordStyleMation
.
wordModelAttrList
);
// 获取boxId
// 获取boxId
var
boxId
=
modelId
+
getRandomValueToString
();
var
boxId
=
modelId
+
getRandomValueToString
();
// 获取文字模型id
// 获取文字模型id
...
@@ -170,7 +173,7 @@ layui.config({
...
@@ -170,7 +173,7 @@ layui.config({
var
wordBox
=
document
.
createElement
(
"
font
"
);
var
wordBox
=
document
.
createElement
(
"
font
"
);
// 为div设置类名
// 为div设置类名
wordBox
.
className
=
"
word-box
"
;
wordBox
.
className
=
"
word-box
"
;
wordBox
.
innerHTML
=
wordStyleMation
[
"
attr
"
][
"
custom.textContent
"
].
v
alue
;
wordBox
.
innerHTML
=
wordStyleMation
[
"
attr
"
][
"
custom.textContent
"
].
defaultV
alue
;
wordBox
.
style
=
styleStr
;
wordBox
.
style
=
styleStr
;
wordBox
.
id
=
wordId
;
wordBox
.
id
=
wordId
;
var
box
=
createBox
(
boxId
,
modelId
,
setDesignAttr
(
wordStyleMation
));
var
box
=
createBox
(
boxId
,
modelId
,
setDesignAttr
(
wordStyleMation
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录