Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
a37d7c54
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1195
Star
154
Fork
127
代码
文件
提交
分支
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看板
提交
a37d7c54
编写于
7月 03, 2024
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
报表设计器修改
上级
9d4992df
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
73 addition
and
22 deletion
+73
-22
report/src/main/resources/template/assets/report/js/skyeyeReportDesigner.js
...sources/template/assets/report/js/skyeyeReportDesigner.js
+70
-19
report/src/main/resources/template/assets/report/json/skyeyeEditor.json
...n/resources/template/assets/report/json/skyeyeEditor.json
+1
-1
report/src/main/resources/template/js/reportPage/reportPageShow.js
...c/main/resources/template/js/reportPage/reportPageShow.js
+1
-1
report/src/main/resources/template/tpl/reportWordModel/reportWordModelWrite.html
...es/template/tpl/reportWordModel/reportWordModelWrite.html
+1
-1
未找到文件。
report/src/main/resources/template/assets/report/js/skyeyeReportDesigner.js
浏览文件 @
a37d7c54
...
...
@@ -58,6 +58,27 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
"
custom.box.border-color
"
:
{
"
value
"
:
"
rgba(255, 255, 255, 1)
"
,
"
edit
"
:
1
,
"
remark
"
:
"
盒子边框
"
,
"
name
"
:
"
盒子边框颜色
"
,
"
editorType
"
:
"
3
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
盒子
"
}
};
// 图表自定义属性
var
tableCustomOptions
=
{
"
custom.dataBaseMation
"
:
{
"
value
"
:
""
,
"
edit
"
:
1
,
"
remark
"
:
"
数据来源
"
,
"
name
"
:
"
数据来源
"
,
"
editorType
"
:
"
99
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
数据源
"
},
"
custom.move.x
"
:
{
"
value
"
:
"
0
"
,
"
edit
"
:
1
,
"
remark
"
:
"
鼠标拖动距离左侧的像素
"
,
"
name
"
:
"
X坐标
"
,
"
editorType
"
:
"
98
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
坐标
"
},
"
custom.move.y
"
:
{
"
value
"
:
"
0
"
,
"
edit
"
:
1
,
"
remark
"
:
"
鼠标拖动距离顶部的像素
"
,
"
name
"
:
"
Y坐标
"
,
"
editorType
"
:
"
98
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
坐标
"
},
"
custom.box.background
"
:
{
"
value
"
:
"
rgba(255, 255, 255, 1)
"
,
"
edit
"
:
1
,
"
remark
"
:
"
盒子背景
"
,
"
name
"
:
"
盒子背景颜色
"
,
"
editorType
"
:
"
3
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
盒子
"
},
"
custom.box.border-color
"
:
{
"
value
"
:
"
rgba(255, 255, 255, 1)
"
,
"
edit
"
:
1
,
"
remark
"
:
"
盒子边框
"
,
"
name
"
:
"
盒子边框颜色
"
,
"
editorType
"
:
"
3
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
盒子
"
},
"
custom.tableColumn
"
:
{
"
defaultValue
"
:
[],
"
edit
"
:
1
,
"
remark
"
:
"
数据表格的信息
"
,
"
name
"
:
"
表格配置
"
,
"
editorType
"
:
"
101
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
数据源
"
},
"
custom.isPage
"
:
{
"
defaultValue
"
:
"
1
"
,
"
edit
"
:
1
,
"
remark
"
:
"
分页的标识
"
,
"
name
"
:
"
是否分页
"
,
"
editorType
"
:
"
1
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
数据源
"
,
"
optionalValue
"
:
[{
"
id
"
:
1
,
"
name
"
:
"
是
"
},
{
"
id
"
:
0
,
"
name
"
:
"
否
"
}]}
};
// 文字自定义属性
var
wordCustomOptions
=
{
"
custom.dataBaseMation
"
:
{
"
value
"
:
""
,
"
edit
"
:
1
,
"
remark
"
:
"
数据来源
"
,
"
name
"
:
"
数据来源
"
,
"
editorType
"
:
"
99
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
数据源
"
},
"
custom.move.x
"
:
{
"
value
"
:
"
0
"
,
"
edit
"
:
1
,
"
remark
"
:
"
鼠标拖动距离左侧的像素
"
,
"
name
"
:
"
X坐标
"
,
"
editorType
"
:
"
98
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
坐标
"
},
"
custom.move.y
"
:
{
"
value
"
:
"
0
"
,
"
edit
"
:
1
,
"
remark
"
:
"
鼠标拖动距离顶部的像素
"
,
"
name
"
:
"
Y坐标
"
,
"
editorType
"
:
"
98
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
坐标
"
},
"
custom.box.background
"
:
{
"
value
"
:
"
rgba(255, 255, 255, 1)
"
,
"
edit
"
:
1
,
"
remark
"
:
"
盒子背景
"
,
"
name
"
:
"
盒子背景颜色
"
,
"
editorType
"
:
"
3
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
盒子
"
},
"
custom.box.border-color
"
:
{
"
value
"
:
"
rgba(255, 255, 255, 1)
"
,
"
edit
"
:
1
,
"
remark
"
:
"
盒子边框
"
,
"
name
"
:
"
盒子边框颜色
"
,
"
editorType
"
:
"
3
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
盒子
"
}
};
var
f
=
{
box
:
function
()
{
var
width
=
$
(
window
).
width
();
...
...
@@ -282,11 +303,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
var
tableId
=
f
.
getTableBox
(
boxId
,
modelId
);
// 加入页面属性
var
table
=
!
isNull
(
tableMation
)
?
tableMation
:
{
attr
:
$
.
extend
(
true
,
{},
echartsCustomOptions
,
{
"
custom.tableColumn
"
:
{
"
defaultValue
"
:
[],
"
edit
"
:
1
,
"
remark
"
:
"
数据表格的信息
"
,
"
name
"
:
"
表格配置
"
,
"
editorType
"
:
"
101
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
数据源
"
},
"
custom.isPage
"
:
{
"
defaultValue
"
:
"
1
"
,
"
edit
"
:
1
,
"
remark
"
:
"
分页的标识
"
,
"
name
"
:
"
是否分页
"
,
"
editorType
"
:
"
1
"
,
"
editorChooseValue
"
:
""
,
"
typeName
"
:
"
数据源
"
,
"
optionalValue
"
:
[{
"
id
"
:
1
,
"
name
"
:
"
是
"
},
{
"
id
"
:
0
,
"
name
"
:
"
否
"
}]},
}),
attr
:
$
.
extend
(
true
,
{},
tableCustomOptions
,
{}),
tableColumnList
:
[],
isPage
:
1
}
...
...
@@ -348,14 +365,50 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
// 加载文字模型
addNewWordModel
:
function
(
modelId
,
wordStyleMation
)
{
var
styleStr
=
getWordStyleStr
(
wordStyleMation
.
wordModelAttrList
);
// 设置Attr的值
if
(
isNull
(
wordStyleMation
.
attr
))
{
wordStyleMation
.
attr
=
{};
}
wordStyleMation
.
wordModelAttrList
.
forEach
(
function
(
item
)
{
if
(
item
.
showToEditor
==
1
)
{
// 显示在编辑框
let
optional
=
item
.
propertyMation
.
optional
;
let
value
=
optional
==
0
?
item
.
propertyMation
.
defaultValue
:
''
;
let
editorChooseValue
=
""
;
if
(
optional
==
1
)
{
// 属性值可选
editorChooseValue
=
[];
item
.
propertyMation
.
propertyValueList
.
forEach
(
function
(
bean
)
{
if
(
value
.
defaultChoose
==
1
)
{
value
=
bean
.
value
;
}
editorChooseValue
.
push
({
id
:
bean
.
value
,
name
:
bean
.
name
});
});
editorChooseValue
=
JSON
.
stringify
(
editorChooseValue
);
}
wordStyleMation
.
attr
[
item
.
propertyMation
.
attrCode
]
=
{
"
defaultValue
"
:
value
,
"
edit
"
:
item
.
editor
,
"
remark
"
:
item
.
propertyMation
.
name
,
"
name
"
:
item
.
propertyMation
.
name
,
"
editorType
"
:
item
.
propertyMation
.
editorType
,
"
editorChooseValue
"
:
editorChooseValue
,
"
typeName
"
:
"
Style属性
"
}
}
})
// 加入页面属性
wordStyleMation
.
attr
=
$
.
extend
(
true
,
{},
wordCustomOptions
,
wordStyleMation
.
attr
);
wordStyleMation
.
attr
[
wordStyleMation
.
customAttr
.
attrCode
]
=
wordStyleMation
.
customAttr
var
styleStr
=
getWordStyleStr
(
wordStyleMation
.
attr
);
// 获取boxId
var
boxId
=
modelId
+
getRandomValueToString
();
// 获取文字模型id
var
wordId
=
f
.
getWordBox
(
boxId
,
modelId
,
styleStr
,
wordStyleMation
);
// 加入页面属性
wordStyleMation
.
attr
=
$
.
extend
(
true
,
{},
echartsCustomOptions
,
wordStyleMation
.
attr
);
wordStyleMation
.
attr
[
wordStyleMation
.
customAttr
.
attrCode
]
=
wordStyleMation
.
customAttr
inPageWordMation
[
boxId
]
=
$
.
extend
(
true
,
{},
wordStyleMation
);
return
boxId
;
},
...
...
@@ -763,7 +816,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
// 被选中项
_this
.
parent
().
find
(
"
.dian
"
).
show
();
_this
.
parent
().
addClass
(
"
active
"
);
f
.
load
Echarts
Editor
();
f
.
load
ReportItem
Editor
();
}
},
...
...
@@ -775,7 +828,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
},
// 加载echarts报表编辑器
load
Echarts
Editor
:
function
()
{
load
ReportItem
Editor
:
function
()
{
var
chooseObject
=
skyeyeReportContent
.
find
(
"
.active
"
).
eq
(
0
);
var
boxId
=
chooseObject
.
data
(
"
boxId
"
);
var
objectMation
=
getDataChooseMation
(
boxId
);
...
...
@@ -1156,7 +1209,7 @@ function resetChartsModel(boxId) {
function
resetWordModel
(
boxId
)
{
var
wordMation
=
inPageWordMation
[
boxId
];
var
styleStr
=
getWordStyleStr
(
wordMation
.
wordModelAttrList
);
var
styleStr
=
getWordStyleStr
(
wordMation
.
attr
);
$
(
"
#
"
+
boxId
).
find
(
"
.word-box
"
).
attr
(
"
style
"
,
styleStr
);
}
...
...
@@ -1244,16 +1297,14 @@ function getEchartsOptions(echartsMation) {
}
// 获取文字模型样式信息
function
getWordStyleStr
(
propertyList
)
{
function
getWordStyleStr
(
attrMap
)
{
var
styleStr
=
""
;
if
(
isNull
(
propertyList
))
{
if
(
isNull
(
attrMap
))
{
return
styleStr
;
}
$
.
each
(
propertyList
,
function
(
index
,
item
)
{
if
(
!
isNull
(
item
.
propertyMation
))
{
if
(
item
.
propertyMation
.
attrCode
.
indexOf
(
"
custom.
"
)
<
0
)
{
styleStr
+=
item
.
propertyMation
.
attrCode
+
"
:
"
+
item
.
propertyMation
.
defaultValue
+
"
;
"
;
}
$
.
each
(
attrMap
,
function
(
key
,
value
)
{
if
(
key
.
indexOf
(
"
custom.
"
)
<
0
)
{
styleStr
+=
key
+
"
:
"
+
value
.
defaultValue
+
"
;
"
;
}
});
return
styleStr
;
...
...
report/src/main/resources/template/assets/report/json/skyeyeEditor.json
浏览文件 @
a37d7c54
...
...
@@ -51,7 +51,7 @@
"99"
:
{
"key"
:
"dataBaseFrom"
,
"name"
:
"数据源选择"
,
"html"
:
"<div class='layui-form-item {{defaultWidth}}' controlType='dataBaseFrom' modelKey='{{modelKey}}' boxId='{{boxId}}'><label class='layui-form-label'><i class='layui-icon layui-icon-tips' lay-tips='{{remark}}'></i>{{labelContent}}:</label><div class='layui-input-block'><input type='text' id='input{{boxId}}{{indexNumber}}' name='input{{boxId}}{{indexNumber}}' class='layui-input' value='{{context.name}}' readonly='readonly'/><i class='fa fa-plus-circle input-icon' id='choose{{boxId}}{{indexNumber}}'></i></div></div>"
,
"html"
:
"<div class='layui-form-item {{defaultWidth}}' controlType='dataBaseFrom' modelKey='{{modelKey}}' boxId='{{boxId}}'><label class='layui-form-label'><i class='layui-icon layui-icon-tips' lay-tips='{{remark}}'></i>{{labelContent}}:</label><div class='layui-input-block
input-add-icon
'><input type='text' id='input{{boxId}}{{indexNumber}}' name='input{{boxId}}{{indexNumber}}' class='layui-input' value='{{context.name}}' readonly='readonly'/><i class='fa fa-plus-circle input-icon' id='choose{{boxId}}{{indexNumber}}'></i></div></div>"
,
"js"
:
"$('body').on('click', '#choose{{boxId}}{{indexNumber}}', function (e) {_openNewWindows({url:'../../tpl/reportDataFrom/reportDataFromChooseList.html', title:'选择数据源',pageId:'dataBaseFrom',area:['90vw','90vh'],callBack:function (refreshCode){if(refreshCode=='0'){$('#input{{boxId}}{{indexNumber}}').val(dataBaseMation.name); dataValueChange(dataBaseMation, $('#input{{boxId}}{{indexNumber}}')); } else if (refreshCode=='-9999'){winui.window.msg(systemLanguage['com.skyeye.operationFailed'][languageType],{icon:2,time:2000});}}});});"
,
"showValueTemplate"
:
""
},
...
...
report/src/main/resources/template/js/reportPage/reportPageShow.js
浏览文件 @
a37d7c54
...
...
@@ -204,7 +204,7 @@ layui.config({
// 加载文字模型
function
addNewWordModel
(
modelId
,
wordStyleMation
)
{
var
styleStr
=
getWordStyleStr
(
wordStyleMation
.
wordModelAttrList
);
var
styleStr
=
getWordStyleStr
(
wordStyleMation
.
attr
);
// 获取boxId
var
boxId
=
modelId
+
getRandomValueToString
();
// 获取文字模型id
...
...
report/src/main/resources/template/tpl/reportWordModel/reportWordModelWrite.html
浏览文件 @
a37d7c54
...
...
@@ -103,7 +103,7 @@
<script
type=
"text/x-handlebars-template"
id=
"usetableTemplate"
>
<
tr
trcusid
=
"
{{trId}}
"
>
<
td
><
input
type
=
"
checkbox
"
rowId
=
"
{{id}}
"
lay
-
filter
=
"
checkboxProperty
"
name
=
"
tableCheckRow
"
/><
/td
>
<
td
>
<
td
class
=
"
input-add-icon
"
>
<
input
type
=
"
text
"
id
=
"
{{propertyId}}
"
name
=
"
{{propertyId}}
"
placeholder
=
"
请选择属性
"
class
=
"
layui-input
"
win
-
verify
=
"
required
"
readonly
=
"
readonly
"
>
<
i
class
=
"
fa fa-plus-circle input-icon choosePropertyBtn
"
style
=
"
top: 12px;
"
><
/i
>
<
/td
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录