Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
d4c8cc98
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1408
Star
161
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看板
提交
d4c8cc98
编写于
11月 07, 2018
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序模板修改
上级
70518aae
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
190 addition
and
72 deletion
+190
-72
skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberadd.js
...-web/src/main/webapp/js/rmgroupmember/rmgroupmemberadd.js
+95
-38
skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberedit.js
...web/src/main/webapp/js/rmgroupmember/rmgroupmemberedit.js
+91
-28
skyeye-web/src/main/webapp/tpl/rmgroupmember/rmgroupmemberadd.html
...b/src/main/webapp/tpl/rmgroupmember/rmgroupmemberadd.html
+3
-4
skyeye-web/src/main/webapp/tpl/rmgroupmember/rmgroupmemberedit.html
.../src/main/webapp/tpl/rmgroupmember/rmgroupmemberedit.html
+1
-2
未找到文件。
skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberadd.js
浏览文件 @
d4c8cc98
...
...
@@ -6,13 +6,66 @@ layui.config({
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
layui
.
use
([
'
form
'
,
'
codemirror
'
,
'
xml
'
,
'
clike
'
,
'
css
'
,
'
htmlmixed
'
,
'
javascript
'
,
'
nginx
'
,
'
solr
'
,
'
sql
'
,
'
vue
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
$
(
"
#download
"
).
hide
();
var
htmlContent
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
htmlContent
"
),
{
mode
:
"
xml
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
4
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
var
htmlJsContent
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
htmlJsContent
"
),
{
mode
:
"
text/javascript
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
4
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
var
wxmlContent
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
wxmlContent
"
),
{
mode
:
"
xml
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
4
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
var
wxmlJsContent
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
wxmlJsContent
"
),
{
mode
:
"
text/javascript
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
4
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
showGrid
({
id
:
"
rmTypeId
"
,
url
:
reqBasePath
+
"
common001
"
,
...
...
@@ -43,36 +96,40 @@ layui.config({
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
if
(
isPic
){
var
oCanvas
=
document
.
getElementById
(
"
thecanvas
"
);
var
imgData
=
oCanvas
.
toDataURL
();
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
common004
"
,
params
:{
images
:
imgData
,
type
:
1
},
type
:
'
json
'
,
callback
:
function
(
json1
){
if
(
json1
.
returnCode
==
0
){
var
params
=
{
rmTypeId
:
$
(
"
#rmTypeId
"
).
val
(),
rmGroupId
:
$
(
"
#rmGroupId
"
).
val
(),
htmlContent
:
encodeURI
(
$
(
"
#htmlContent
"
).
val
()),
htmlJsContent
:
encodeURI
(
$
(
"
#htmlJsContent
"
).
val
()),
wxmlContent
:
encodeURI
(
$
(
"
#wxmlContent
"
).
val
()),
wxmlJsContent
:
encodeURI
(
$
(
"
#wxmlJsContent
"
).
val
()),
img
:
json1
.
bean
.
picUrl
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx016
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
else
{
if
(
!
isPic
){
top
.
winui
.
window
.
msg
(
"
请先生成预览图
"
,
{
icon
:
2
,
time
:
2000
});
}
}
else
if
(
isNull
(
htmlContent
.
getValue
())){
top
.
winui
.
window
.
msg
(
"
请填写HTML内容
"
,
{
icon
:
2
,
time
:
2000
});
}
else
if
(
isNull
(
wxmlContent
.
getValue
())){
top
.
winui
.
window
.
msg
(
"
请填写WXML内容
"
,
{
icon
:
2
,
time
:
2000
});
}
else
{
var
oCanvas
=
document
.
getElementById
(
"
thecanvas
"
);
var
imgData
=
oCanvas
.
toDataURL
();
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
common004
"
,
params
:{
images
:
imgData
,
type
:
1
},
type
:
'
json
'
,
callback
:
function
(
json1
){
if
(
json1
.
returnCode
==
0
){
var
params
=
{
rmTypeId
:
$
(
"
#rmTypeId
"
).
val
(),
rmGroupId
:
$
(
"
#rmGroupId
"
).
val
(),
htmlContent
:
encodeURI
(
htmlContent
.
getValue
()),
htmlJsContent
:
encodeURI
(
htmlJsContent
.
getValue
()),
wxmlContent
:
encodeURI
(
wxmlContent
.
getValue
()),
wxmlJsContent
:
encodeURI
(
wxmlJsContent
.
getValue
()),
img
:
json1
.
bean
.
picUrl
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx016
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
}
return
false
;
});
...
...
@@ -80,16 +137,16 @@ layui.config({
});
//HTML内容变化事件
$
(
"
body
"
).
on
(
"
input
"
,
"
#htmlContent
"
,
function
(){
$
(
"
#
htmlJsContentScript
"
).
html
(
'
<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {
'
+
$
(
"
#htmlJsContent
"
).
val
()
+
'
})(jQuery);});</script>
'
);
$
(
"
#
printPic
"
).
html
(
$
(
this
).
val
()
);
});
htmlContent
.
on
(
"
change
"
,
function
(){
$
(
"
#
printPic
"
).
html
(
htmlContent
.
getValue
()
);
$
(
"
#
htmlJsContentScript
"
).
html
(
'
<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {
'
+
htmlJsContent
.
getValue
()
+
'
})(jQuery);});</script>
'
);
});
//HTML-JS内容变化事件
$
(
"
body
"
).
on
(
"
change
"
,
"
#htmlJsContent
"
,
function
(){
$
(
"
#
htmlJsContentScript
"
).
html
(
'
<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {
'
+
$
(
"
#htmlJsContent
"
).
val
()
+
'
})(jQuery);});</script>
'
);
// $("#htmlJsContent").val(do_js_beautify($(this).val())
);
});
htmlJsContent
.
on
(
"
change
"
,
function
(){
$
(
"
#
printPic
"
).
html
(
htmlContent
.
getValue
()
);
$
(
"
#htmlJsContentScript
"
).
html
(
'
<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {
'
+
htmlJsContent
.
getValue
()
+
'
})(jQuery);});</script>
'
);
});
//下载canvas图片
$
(
"
body
"
).
on
(
"
click
"
,
"
#download
"
,
function
(){
...
...
skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberedit.js
浏览文件 @
d4c8cc98
...
...
@@ -4,10 +4,12 @@ layui.config({
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
fileUpload
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
layui
.
use
([
'
form
'
,
'
codemirror
'
,
'
xml
'
,
'
clike
'
,
'
css
'
,
'
htmlmixed
'
,
'
javascript
'
,
'
nginx
'
,
'
solr
'
,
'
sql
'
,
'
vue
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
var
htmlContent
,
htmlJsContent
,
wxmlContent
,
wxmlJsContent
;
showGrid
({
id
:
"
showForm
"
,
...
...
@@ -31,31 +33,92 @@ layui.config({
}
});
htmlContent
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
htmlContent
"
),
{
mode
:
"
xml
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
4
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
htmlJsContent
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
htmlJsContent
"
),
{
mode
:
"
text/javascript
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
4
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
wxmlContent
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
wxmlContent
"
),
{
mode
:
"
xml
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
4
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
wxmlJsContent
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"
wxmlJsContent
"
),
{
mode
:
"
text/javascript
"
,
// 模式
theme
:
"
eclipse
"
,
// CSS样式选择
indentUnit
:
4
,
// 缩进单位,默认2
smartIndent
:
true
,
// 是否智能缩进
tabSize
:
4
,
// Tab缩进,默认4
readOnly
:
false
,
// 是否只读,默认false
showCursorWhenSelecting
:
true
,
lineNumbers
:
true
,
// 是否显示行号
styleActiveLine
:
true
,
//line选择是是否加亮
matchBrackets
:
true
,
});
//初始化效果图
$
(
"
#printPic
"
).
html
(
htmlContent
.
getValue
());
$
(
"
#htmlJsContentScript
"
).
html
(
'
<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {
'
+
htmlJsContent
.
getValue
()
+
'
})(jQuery);});</script>
'
);
//搜索表单
form
.
render
();
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
params
=
{
htmlContent
:
encodeURI
(
$
(
"
#htmlContent
"
).
val
()),
htmlJsContent
:
encodeURI
(
$
(
"
#htmlJsContent
"
).
val
()),
wxmlContent
:
encodeURI
(
$
(
"
#wxmlContent
"
).
val
()),
wxmlJsContent
:
encodeURI
(
$
(
"
#wxmlJsContent
"
).
val
()),
rowId
:
parent
.
rowId
,
};
params
.
img
=
$
(
"
#printsPicUrl
"
).
find
(
"
input[type='hidden'][name='upload']
"
).
attr
(
"
oldurl
"
);
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx021
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
if
(
isNull
(
htmlContent
.
getValue
())){
top
.
winui
.
window
.
msg
(
"
请填写HTML内容
"
,
{
icon
:
2
,
time
:
2000
});
}
else
if
(
isNull
(
wxmlContent
.
getValue
())){
top
.
winui
.
window
.
msg
(
"
请填写WXML内容
"
,
{
icon
:
2
,
time
:
2000
});
}
else
{
var
params
=
{
htmlContent
:
encodeURI
(
htmlContent
.
getValue
()),
htmlJsContent
:
encodeURI
(
htmlJsContent
.
getValue
()),
wxmlContent
:
encodeURI
(
wxmlContent
.
getValue
()),
wxmlJsContent
:
encodeURI
(
wxmlJsContent
.
getValue
()),
rowId
:
parent
.
rowId
,
};
params
.
img
=
$
(
"
#printsPicUrl
"
).
find
(
"
input[type='hidden'][name='upload']
"
).
attr
(
"
oldurl
"
);
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
rmxcx021
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
}
return
false
;
});
...
...
@@ -63,16 +126,16 @@ layui.config({
});
//HTML内容变化事件
$
(
"
body
"
).
on
(
"
input
"
,
"
#htmlContent
"
,
function
(){
$
(
"
#
htmlJsContentScript
"
).
html
(
'
<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {
'
+
$
(
"
#htmlJsContent
"
).
val
()
+
'
})(jQuery);});</script>
'
);
$
(
"
#
printPic
"
).
html
(
$
(
this
).
val
()
);
});
htmlContent
.
on
(
"
change
"
,
function
(){
$
(
"
#
printPic
"
).
html
(
htmlContent
.
getValue
()
);
$
(
"
#
htmlJsContentScript
"
).
html
(
'
<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {
'
+
htmlJsContent
.
getValue
()
+
'
})(jQuery);});</script>
'
);
});
//HTML-JS内容变化事件
$
(
"
body
"
).
on
(
"
change
"
,
"
#htmlJsContent
"
,
function
(){
$
(
"
#
htmlJsContentScript
"
).
html
(
'
<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {
'
+
$
(
"
#htmlJsContent
"
).
val
()
+
'
})(jQuery);});</script>
'
);
// $("#htmlJsContent").val(do_js_beautify($(this).val())
);
});
htmlJsContent
.
on
(
"
change
"
,
function
(){
$
(
"
#
printPic
"
).
html
(
htmlContent
.
getValue
()
);
$
(
"
#htmlJsContentScript
"
).
html
(
'
<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {
'
+
htmlJsContent
.
getValue
()
+
'
})(jQuery);});</script>
'
);
});
//取消
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
(){
...
...
skyeye-web/src/main/webapp/tpl/rmgroupmember/rmgroupmemberadd.html
浏览文件 @
d4c8cc98
...
...
@@ -7,8 +7,7 @@
<link
href=
"../../assets/lib/font-awesome-4.7.0/css/font-awesome.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/winui/weui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/layui/lay/modules/ztree/css/zTreeStyle/zTreeStyle.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/layui/css/codemirror.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"width:600px;margin:0 auto;padding-top:20px;"
>
...
...
@@ -32,7 +31,7 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
HTML内容
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<textarea
id=
"htmlContent"
name=
"htmlContent"
win-verify=
"required"
placeholder=
"请填写代码块"
class=
"layui-textarea"
style=
"height: 100px;"
></textarea>
<textarea
id=
"htmlContent"
name=
"htmlContent"
placeholder=
"请填写代码块"
class=
"layui-textarea"
style=
"height: 100px;"
></textarea>
</div>
</div>
<div
class=
"layui-form-item"
>
...
...
@@ -67,7 +66,7 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
WXML内容
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<textarea
id=
"wxmlContent"
name=
"wxmlContent"
win-verify=
"required"
placeholder=
"请填写代码块"
class=
"layui-textarea"
style=
"height: 100px;"
></textarea>
<textarea
id=
"wxmlContent"
name=
"wxmlContent"
placeholder=
"请填写代码块"
class=
"layui-textarea"
style=
"height: 100px;"
></textarea>
</div>
</div>
<div
class=
"layui-form-item"
>
...
...
skyeye-web/src/main/webapp/tpl/rmgroupmember/rmgroupmemberedit.html
浏览文件 @
d4c8cc98
...
...
@@ -7,8 +7,7 @@
<link
href=
"../../assets/lib/font-awesome-4.7.0/css/font-awesome.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/winui/weui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/layui/lay/modules/ztree/css/zTreeStyle/zTreeStyle.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/layui/css/codemirror.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"width:600px;margin:0 auto;padding-top:20px;"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录