Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
8ddae51c
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1435
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看板
提交
8ddae51c
编写于
11月 07, 2018
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码生成器完成
上级
e9ee4c71
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
80 addition
and
9 deletion
+80
-9
skyeye-service/src/main/java/com/skyeye/common/service/impl/CommonServiceImpl.java
...ava/com/skyeye/common/service/impl/CommonServiceImpl.java
+10
-2
skyeye-web/src/main/webapp/js/codemodelgroup/usemodelgroup.js
...ye-web/src/main/webapp/js/codemodelgroup/usemodelgroup.js
+44
-1
skyeye-web/src/main/webapp/tpl/codemodelgroup/usemodelgroup.html
...web/src/main/webapp/tpl/codemodelgroup/usemodelgroup.html
+26
-6
未找到文件。
skyeye-service/src/main/java/com/skyeye/common/service/impl/CommonServiceImpl.java
浏览文件 @
8ddae51c
...
@@ -214,7 +214,11 @@ public class CommonServiceImpl implements CommonService{
...
@@ -214,7 +214,11 @@ public class CommonServiceImpl implements CommonService{
JSONObject
object
=
(
JSONObject
)
array
.
get
(
i
);
JSONObject
object
=
(
JSONObject
)
array
.
get
(
i
);
//加入压缩包
//加入压缩包
ByteArrayInputStream
stream
=
new
ByteArrayInputStream
(
object
.
getString
(
"content"
).
getBytes
());
ByteArrayInputStream
stream
=
new
ByteArrayInputStream
(
object
.
getString
(
"content"
).
getBytes
());
out
.
putNextEntry
(
new
ZipEntry
(
object
.
getString
(
"fileName"
)
+
"."
+
object
.
getString
(
"modelType"
).
toLowerCase
()));
if
(
"javascript"
.
equals
(
object
.
getString
(
"modelType"
).
toLowerCase
())){
out
.
putNextEntry
(
new
ZipEntry
(
object
.
getString
(
"fileName"
)
+
".js"
));
}
else
{
out
.
putNextEntry
(
new
ZipEntry
(
object
.
getString
(
"fileName"
)
+
"."
+
object
.
getString
(
"modelType"
).
toLowerCase
()));
}
int
len
;
int
len
;
// 读入需要下载的文件的内容,打包到zip文件
// 读入需要下载的文件的内容,打包到zip文件
while
((
len
=
stream
.
read
(
buffer
))
>
0
)
{
while
((
len
=
stream
.
read
(
buffer
))
>
0
)
{
...
@@ -229,7 +233,11 @@ public class CommonServiceImpl implements CommonService{
...
@@ -229,7 +233,11 @@ public class CommonServiceImpl implements CommonService{
bean
.
put
(
"content"
,
object
.
getString
(
"content"
));
bean
.
put
(
"content"
,
object
.
getString
(
"content"
));
bean
.
put
(
"createId"
,
user
.
get
(
"id"
));
bean
.
put
(
"createId"
,
user
.
get
(
"id"
));
bean
.
put
(
"fileName"
,
object
.
getString
(
"fileName"
));
bean
.
put
(
"fileName"
,
object
.
getString
(
"fileName"
));
bean
.
put
(
"fileType"
,
object
.
getString
(
"modelType"
).
toLowerCase
());
if
(
"javascript"
.
equals
(
object
.
getString
(
"modelType"
).
toLowerCase
())){
bean
.
put
(
"fileType"
,
"js"
);
}
else
{
bean
.
put
(
"fileType"
,
object
.
getString
(
"modelType"
).
toLowerCase
());
}
bean
.
put
(
"filePath"
,
zipName
);
bean
.
put
(
"filePath"
,
zipName
);
bean
.
put
(
"createTime"
,
ToolUtil
.
getTimeAndToString
());
bean
.
put
(
"createTime"
,
ToolUtil
.
getTimeAndToString
());
inBeans
.
add
(
bean
);
inBeans
.
add
(
bean
);
...
...
skyeye-web/src/main/webapp/js/codemodelgroup/usemodelgroup.js
浏览文件 @
8ddae51c
...
@@ -41,6 +41,8 @@ layui.config({
...
@@ -41,6 +41,8 @@ layui.config({
var
subData
=
list
;
var
subData
=
list
;
if
(
subData
.
length
==
0
){
if
(
subData
.
length
==
0
){
top
.
winui
.
window
.
msg
(
'
请先生成转换结果
'
,
{
icon
:
2
,
time
:
2000
});
top
.
winui
.
window
.
msg
(
'
请先生成转换结果
'
,
{
icon
:
2
,
time
:
2000
});
}
else
if
(
$
(
'
#modelList
'
).
find
(
'
li
'
).
length
>
subData
.
length
){
top
.
winui
.
window
.
msg
(
'
您有模板未生成代码文件,请检查。
'
,
{
icon
:
2
,
time
:
2000
});
}
else
{
}
else
{
for
(
var
i
=
0
;
i
<
subData
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
subData
.
length
;
i
++
){
subData
[
i
].
modelContent
=
""
;
subData
[
i
].
modelContent
=
""
;
...
@@ -94,6 +96,45 @@ layui.config({
...
@@ -94,6 +96,45 @@ layui.config({
}
}
});
});
var
showCreateHtmlMation
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
showCreateHtmlMation
"
),
{
mode
:
"
xml
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
2
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
var
showCreateRequireMation
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
showCreateRequireMation
"
),
{
mode
:
"
xml
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
2
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
var
showCreateJsMation
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
showCreateJsMation
"
),
{
mode
:
"
text/javascript
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
2
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
//加载模块
//加载模块
showGrid
({
showGrid
({
id
:
"
modelList
"
,
id
:
"
modelList
"
,
...
@@ -197,7 +238,9 @@ layui.config({
...
@@ -197,7 +238,9 @@ layui.config({
pageId
:
"
addcontenttohtmlorjs
"
,
pageId
:
"
addcontenttohtmlorjs
"
,
callBack
:
function
(
refreshCode
){
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
if
(
refreshCode
==
'
0
'
)
{
console
.
log
(
result
);
showCreateHtmlMation
.
setValue
(
result
.
htmlContent
);
showCreateRequireMation
.
setValue
(
"
前端限制参数:
"
+
result
.
formermation
+
"
\n
后端限制参数:
"
+
result
.
aftermation
);
showCreateJsMation
.
setValue
(
result
.
jsContent
);
}
else
if
(
refreshCode
==
'
-9999
'
)
{
}
else
if
(
refreshCode
==
'
-9999
'
)
{
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
}
}
...
...
skyeye-web/src/main/webapp/tpl/codemodelgroup/usemodelgroup.html
浏览文件 @
8ddae51c
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
<div
class=
"winui-toolbar"
>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
参数设置(最终保存内容)
<button
type=
"button"
class=
"layui-btn layui-btn-xs"
style=
"float: right;"
id=
"addContentToHTMLorJS"
>
添加参数
</button></div>
<div
class=
"winui-tool"
>
参数设置(最终保存内容)
<button
type=
"button"
class=
"layui-btn layui-btn-xs"
style=
"float: right;"
id=
"addContentToHTMLorJS"
>
添加参数
</button></div>
</div>
</div>
<div
class=
"layui-row"
style=
"height:
100%
"
>
<div
class=
"layui-row"
style=
"height:
calc(100vh - 75px);
"
>
<textarea
id=
"textContent"
></textarea>
<textarea
id=
"textContent"
></textarea>
</div>
</div>
</div>
</div>
...
@@ -111,11 +111,31 @@
...
@@ -111,11 +111,31 @@
</table>
</table>
</div>
</div>
</div>
</div>
<div
class=
"layui-row"
style=
"height: 120px"
>
<div
class=
"layui-row"
style=
"height: 150px"
>
<div
class=
"winui-toolbar"
>
<div
class=
"layui-col-xs3 left-menu"
>
<div
class=
"winui-tool"
>
请求链接
</div>
<div
class=
"winui-toolbar"
>
</div>
<div
class=
"winui-tool"
>
限制条件
</div>
</div>
<div
class=
"layui-row"
style=
"height: calc(42vh - 85px);"
>
<textarea
id=
"showCreateRequireMation"
></textarea>
</div>
</div>
<div
class=
"layui-col-xs6 center-content"
>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
html代码
</div>
</div>
<div
class=
"layui-row"
style=
"height: calc(42vh - 85px);"
>
<textarea
id=
"showCreateHtmlMation"
></textarea>
</div>
</div>
<div
class=
"layui-col-xs3 right-menu"
>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
js代码
</div>
</div>
<div
class=
"layui-row"
style=
"height: calc(42vh - 85px);"
>
<textarea
id=
"showCreateJsMation"
></textarea>
</div>
</div>
</div>
</div>
<div
class=
"layui-row"
style=
"height: 50px;text-align: center;"
>
<div
class=
"layui-row"
style=
"height: 50px;text-align: center;"
>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录