Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
7ae6eec7
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1434
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看板
提交
7ae6eec7
编写于
4月 23, 2024
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 报表数据来源-API新增服务属性
上级
286f7fa5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
38 deletion
+25
-38
report/src/main/resources/template/js/reportDataFrom/reportDataFromWrite.js
...sources/template/js/reportDataFrom/reportDataFromWrite.js
+8
-6
report/src/main/resources/template/js/reportPage/reportPageShow.js
...c/main/resources/template/js/reportPage/reportPageShow.js
+10
-31
report/src/main/resources/template/tpl/reportDataFrom/dataFromTpl/restTemplate.tpl
.../template/tpl/reportDataFrom/dataFromTpl/restTemplate.tpl
+7
-1
未找到文件。
report/src/main/resources/template/js/reportDataFrom/reportDataFromWrite.js
浏览文件 @
7ae6eec7
...
@@ -19,6 +19,7 @@ layui.config({
...
@@ -19,6 +19,7 @@ layui.config({
if
(
isNull
(
id
))
{
if
(
isNull
(
id
))
{
skyeyeClassEnumUtil
.
showEnumDataListByClassName
(
"
reportDataFromType
"
,
'
radio
'
,
"
dataFromTypeBox
"
,
''
,
form
);
skyeyeClassEnumUtil
.
showEnumDataListByClassName
(
"
reportDataFromType
"
,
'
radio
'
,
"
dataFromTypeBox
"
,
''
,
form
);
initDataFromBoxContent
(
dataShowType
.
getData
(
'
dataFromTypeBox
'
),
null
)
initDataFromBoxContent
(
dataShowType
.
getData
(
'
dataFromTypeBox
'
),
null
)
$
(
"
#serviceStr
"
).
html
(
getDataUseHandlebars
(
selOption
,
{
rows
:
serviceMap
}));
}
else
{
}
else
{
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
reportBasePath
+
"
queryReportDataFromById
"
,
params
:
{
id
:
id
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
data
)
{
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
reportBasePath
+
"
queryReportDataFromById
"
,
params
:
{
id
:
id
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
data
)
{
$
(
"
#name
"
).
val
(
data
.
bean
.
name
);
$
(
"
#name
"
).
val
(
data
.
bean
.
name
);
...
@@ -27,6 +28,9 @@ layui.config({
...
@@ -27,6 +28,9 @@ layui.config({
initDataFromBoxContent
(
data
.
bean
.
type
,
data
.
bean
)
initDataFromBoxContent
(
data
.
bean
.
type
,
data
.
bean
)
$
(
"
#serviceStr
"
).
html
(
getDataUseHandlebars
(
selOption
,
{
rows
:
serviceMap
}));
$
(
"
#serviceStr
"
).
val
(
data
.
bean
.
restEntity
?.
serviceStr
);
var
list
=
[]
var
list
=
[]
if
(
data
.
bean
.
type
==
1
)
{
if
(
data
.
bean
.
type
==
1
)
{
// XML数据源
// XML数据源
...
@@ -67,10 +71,6 @@ layui.config({
...
@@ -67,10 +71,6 @@ layui.config({
type
:
dataShowType
.
getData
(
'
dataFromTypeBox
'
),
type
:
dataShowType
.
getData
(
'
dataFromTypeBox
'
),
id
:
isNull
(
id
)
?
''
:
id
id
:
isNull
(
id
)
?
''
:
id
};
};
if
(
getAnalysisData
().
length
==
0
)
{
winui
.
window
.
msg
(
'
请进行字段解析操作。
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
var
otherData
=
getDataByType
();
var
otherData
=
getDataByType
();
params
=
$
.
extend
(
true
,
params
,
otherData
);
params
=
$
.
extend
(
true
,
params
,
otherData
);
...
@@ -125,7 +125,8 @@ layui.config({
...
@@ -125,7 +125,8 @@ layui.config({
method
:
$
(
"
#restMethod
"
).
val
(),
method
:
$
(
"
#restMethod
"
).
val
(),
header
:
getRestRequestHeaderData
(),
header
:
getRestRequestHeaderData
(),
requestBody
:
restRequestBodyContent
.
getValue
(),
requestBody
:
restRequestBodyContent
.
getValue
(),
analysisList
:
getAnalysisData
()
analysisList
:
getAnalysisData
(),
serviceStr
:
$
(
"
#serviceStr
"
).
val
()
})
})
};
};
}
}
...
@@ -352,7 +353,8 @@ layui.config({
...
@@ -352,7 +353,8 @@ layui.config({
requestUrl
:
$
(
"
#restUrl
"
).
val
(),
requestUrl
:
$
(
"
#restUrl
"
).
val
(),
requestMethod
:
$
(
"
#restMethod
"
).
val
(),
requestMethod
:
$
(
"
#restMethod
"
).
val
(),
requestHeader
:
getRestRequestHeaderData
(),
requestHeader
:
getRestRequestHeaderData
(),
requestBody
:
restRequestBodyContent
.
getValue
()
requestBody
:
restRequestBodyContent
.
getValue
(),
serviceStr
:
$
(
"
#serviceStr
"
).
val
()
};
};
}
else
if
(
dataFromType
==
4
)
{
}
else
if
(
dataFromType
==
4
)
{
// SQL数据源
// SQL数据源
...
...
report/src/main/resources/template/js/reportPage/reportPageShow.js
浏览文件 @
7ae6eec7
...
@@ -88,7 +88,7 @@ layui.config({
...
@@ -88,7 +88,7 @@ layui.config({
var
topNum
=
multiplication
(
item
.
attrMation
.
attr
[
"
custom.move.y
"
].
defaultValue
,
heightScale
);
var
topNum
=
multiplication
(
item
.
attrMation
.
attr
[
"
custom.move.y
"
].
defaultValue
,
heightScale
);
item
.
attrMation
.
attr
[
"
custom.move.x
"
].
defaultValue
=
leftNum
;
item
.
attrMation
.
attr
[
"
custom.move.x
"
].
defaultValue
=
leftNum
;
item
.
attrMation
.
attr
[
"
custom.move.y
"
].
defaultValue
=
topNum
;
item
.
attrMation
.
attr
[
"
custom.move.y
"
].
defaultValue
=
topNum
;
item
.
attrMation
.
attr
=
getTableDataFromRest
(
item
.
attrMation
.
attr
);
item
.
attrMation
.
businessApi
=
getTableDataFromRest
(
item
.
attrMation
.
attr
);
var
boxId
=
addNewTableModel
(
item
.
modelId
,
item
.
attrMation
);
var
boxId
=
addNewTableModel
(
item
.
modelId
,
item
.
attrMation
);
$
(
"
#
"
+
boxId
).
css
({
$
(
"
#
"
+
boxId
).
css
({
left
:
leftNum
+
"
px
"
,
left
:
leftNum
+
"
px
"
,
...
@@ -145,29 +145,20 @@ layui.config({
...
@@ -145,29 +145,20 @@ layui.config({
}
}
function
getTableDataFromRest
(
attr
)
{
function
getTableDataFromRest
(
attr
)
{
if
(
isNull
(
attr
[
'
custom.tableColumn
'
].
defaultValue
))
{
var
businessApi
=
{};
return
attr
;
}
var
fromId
=
attr
[
'
custom.dataBaseMation
'
].
defaultValue
.
id
;
var
fromId
=
attr
[
'
custom.dataBaseMation
'
].
defaultValue
.
id
;
var
needGetData
=
{};
if
(
isNull
(
fromId
))
{
attr
[
'
custom.tableColumn
'
].
defaultValue
.
forEach
(
item
=>
{
return
businessApi
;
needGetData
[
item
.
attrKey
]
=
''
;
});
if
(
isNull
(
fromId
)
||
needGetData
.
length
==
0
)
{
return
attr
;
}
}
var
params
=
{
var
params
=
{
id
:
fromId
,
id
:
fromId
needGetDataStr
:
JSON
.
stringify
(
needGetData
),
inputParams
:
JSON
.
stringify
({
page
:
1
,
limit
:
15
})
};
};
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
reportBasePath
+
"
queryReportDataFromMationById
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
reportBasePath
+
"
queryReportDataFromById
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
GET
"
,
callback
:
function
(
json
)
{
attr
[
"
valueList
"
]
=
json
.
rows
businessApi
.
serviceStr
=
json
.
bean
.
restEntity
?.
serviceStr
;
businessApi
.
api
=
json
.
bean
.
restEntity
?.
restUrl
;
businessApi
.
method
=
json
.
bean
.
restEntity
?.
method
;
},
async
:
false
});
},
async
:
false
});
return
attr
;
return
businessApi
;
}
}
function
addNewModel
(
modelId
,
echartsMation
)
{
function
addNewModel
(
modelId
,
echartsMation
)
{
...
@@ -235,18 +226,6 @@ layui.config({
...
@@ -235,18 +226,6 @@ layui.config({
var
box
=
createBox
(
boxId
,
modelId
,
null
);
var
box
=
createBox
(
boxId
,
modelId
,
null
);
var
tableBoxId
=
"
table
"
+
boxId
;
var
tableBoxId
=
"
table
"
+
boxId
;
var
tableBox
=
document
.
createElement
(
"
div
"
);
// 为div设置类名
tableBox
.
className
=
"
table-box
"
;
tableBox
.
id
=
"
label-
"
+
tableBoxId
;
tableBox
.
onmousedown
=
ee
=>
{
var
id
=
$
(
"
#
"
+
tableBoxId
).
parent
().
attr
(
"
id
"
);
f
.
setMoveEvent
(
ee
,
$
(
"
#
"
+
id
));
// 阻止事件冒泡(针对父元素的move)
ee
.
stopPropagation
();
};
box
.
appendChild
(
tableBox
);
var
table
=
document
.
createElement
(
"
table
"
);
var
table
=
document
.
createElement
(
"
table
"
);
table
.
id
=
tableBoxId
;
table
.
id
=
tableBoxId
;
box
.
appendChild
(
table
);
box
.
appendChild
(
table
);
...
...
report/src/main/resources/template/tpl/reportDataFrom/dataFromTpl/restTemplate.tpl
浏览文件 @
7ae6eec7
<div
class=
"layui-form-item layui-col-xs12"
>
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
所属服务
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<select
id=
"serviceStr"
name=
"serviceStr"
lay-filter=
"serviceStr"
win-verify=
"required"
lay-search=
""
></select>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
接口地址
<i
class=
"red"
>
*
</i></label>
<label
class=
"layui-form-label"
>
接口地址
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"restUrl"
name=
"restUrl"
win-verify=
"required"
placeholder=
"请输入接口地址"
class=
"layui-input"
/>
<input
type=
"text"
id=
"restUrl"
name=
"restUrl"
win-verify=
"required"
placeholder=
"请输入接口地址"
class=
"layui-input"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录