Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
411e228c
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1431
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看板
提交
411e228c
编写于
7月 30, 2019
作者:
Skyeye云
提交者:
Gitee
7月 30, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
删除目录skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign
上级
76547e95
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
0 addition
and
4356 deletion
+0
-4356
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/designSurveyEditor.js
...esources/template/js/dwsurveydesign/designSurveyEditor.js
+0
-49
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/designSurveyOp.js
...in/resources/template/js/dwsurveydesign/designSurveyOp.js
+0
-179
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/dwsurveydesign.js
...in/resources/template/js/dwsurveydesign/dwsurveydesign.js
+0
-2994
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/dwsurveydesignadd.js
...resources/template/js/dwsurveydesign/dwsurveydesignadd.js
+0
-37
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/dwsurveydesigncopy.js
...esources/template/js/dwsurveydesign/dwsurveydesigncopy.js
+0
-40
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/dwsurveydesignlist.js
...esources/template/js/dwsurveydesign/dwsurveydesignlist.js
+0
-216
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/dwsurveydesignrulecode.js
...rces/template/js/dwsurveydesign/dwsurveydesignrulecode.js
+0
-32
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/modelUIDialog.js
...ain/resources/template/js/dwsurveydesign/modelUIDialog.js
+0
-194
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/surveyRelove.js
...main/resources/template/js/dwsurveydesign/surveyRelove.js
+0
-53
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/surveyReport.js
...main/resources/template/js/dwsurveydesign/surveyReport.js
+0
-562
未找到文件。
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/designSurveyEditor.js
已删除
100644 → 0
浏览文件 @
76547e95
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
,
'
layedit
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
,
layedit
=
layui
.
layedit
;
$
(
"
#content
"
).
val
(
parent
.
ueEditObj
);
var
layContent
=
layedit
.
build
(
'
content
'
,
{
tool
:
[
'
strong
'
//加粗
,
'
italic
'
//斜体
,
'
underline
'
//下划线
,
'
del
'
//删除线
,
'
|
'
//分割线
,
'
left
'
//左对齐
,
'
center
'
//居中对齐
,
'
right
'
//右对齐
,
'
link
'
//超链接
,
'
unlink
'
//清除链接
,
'
face
'
//表情
]
});
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
if
(
isNull
(
layedit
.
getContent
(
layContent
))){
top
.
winui
.
window
.
msg
(
'
请输入内容。
'
,
{
icon
:
2
,
time
:
2000
});
}
else
{
parent
.
ueEditObj
=
layedit
.
getContent
(
layContent
);
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
}
return
false
;
});
});
});
\ No newline at end of file
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/designSurveyOp.js
已删除
100644 → 0
浏览文件 @
76547e95
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
jquery
'
,
'
winui
'
,
'
laydate
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
,
laydate
=
layui
.
laydate
;
showGrid
({
id
:
"
showForm
"
,
url
:
reqBasePath
+
"
dwsurveydirectory004
"
,
params
:
{
rowId
:
parent
.
parent
.
rowId
},
pagination
:
false
,
template
:
getFileContent
(
'
tpl/dwsurveydesign/designSurveyOpTemplates.tpl
'
),
ajaxSendLoadBefore
:
function
(
hdb
){
hdb
.
registerHelper
(
'
compare1
'
,
function
(
v1
,
v2
,
options
)
{
if
(
v1
==
v2
){
return
"
checked
"
;
}
else
{
return
""
;
}
});
hdb
.
registerHelper
(
'
compare2
'
,
function
(
v1
,
v2
,
options
)
{
if
(
v1
!=
v2
){
return
"
readonly
"
;
}
else
{
return
""
;
}
});
hdb
.
registerHelper
(
'
compare3
'
,
function
(
v1
,
v2
,
v3
,
options
)
{
if
(
v1
==
v2
){
return
v3
;
}
else
{
return
""
;
}
});
},
ajaxSendAfter
:
function
(
json
){
laydate
.
render
({
elem
:
'
#endTime
'
,
//指定元素
format
:
'
yyyy-MM-dd HH:mm:ss
'
,
type
:
'
datetime
'
,
min
:
minDate
(),
theme
:
'
grid
'
});
if
(
json
.
bean
.
ynEndTime
==
'
1
'
){
$
(
"
#endTimeHide
"
).
hide
();
}
else
{
$
(
"
#endTimeHide
"
).
show
();
}
form
.
render
(
'
checkbox
'
);
form
.
render
();
form
.
on
(
'
checkbox(rule)
'
,
function
(
data
)
{
var
check
=
data
.
elem
.
checked
;
if
(
check
){
//选中
$
(
"
#ruleCode
"
).
attr
(
"
readonly
"
,
false
);
}
else
{
$
(
"
#ruleCode
"
).
val
(
""
);
$
(
"
#ruleCode
"
).
attr
(
"
readonly
"
,
true
);
}
});
form
.
on
(
'
checkbox(ynEndNum)
'
,
function
(
data
)
{
var
check
=
data
.
elem
.
checked
;
if
(
check
){
//选中
$
(
"
#endNum
"
).
attr
(
"
readonly
"
,
false
);
}
else
{
$
(
"
#endNum
"
).
val
(
""
);
$
(
"
#endNum
"
).
attr
(
"
readonly
"
,
true
);
}
});
form
.
on
(
'
checkbox(ynEndTime)
'
,
function
(
data
)
{
var
check
=
data
.
elem
.
checked
;
if
(
check
){
//选中
$
(
"
#endTimeHide
"
).
hide
();
$
(
"
#endTime
"
).
attr
(
"
readonly
"
,
false
);
}
else
{
$
(
"
#endTimeHide
"
).
show
();
$
(
"
#endTime
"
).
val
(
""
);
$
(
"
#endTime
"
).
attr
(
"
readonly
"
,
true
);
}
});
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
params
=
{
rowId
:
parent
.
parent
.
rowId
};
if
(
$
(
'
input[name=effective]
'
).
get
(
0
).
checked
){
params
.
effective
=
'
4
'
;
}
else
{
params
.
effective
=
'
1
'
;
}
if
(
$
(
'
input[name=effectiveIp]
'
).
get
(
0
).
checked
){
params
.
effectiveIp
=
'
1
'
;
}
else
{
params
.
effectiveIp
=
'
0
'
;
}
if
(
$
(
'
input[name=rule]
'
).
get
(
0
).
checked
){
params
.
rule
=
'
3
'
;
params
.
ruleCode
=
$
(
"
#ruleCode
"
).
val
();
if
(
isNull
(
params
.
ruleCode
)){
top
.
winui
.
window
.
msg
(
'
请填写答卷密码
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
}
else
{
params
.
rule
=
'
1
'
;
params
.
ruleCode
=
''
;
}
if
(
$
(
'
input[name=refresh]
'
).
get
(
0
).
checked
){
params
.
refresh
=
'
1
'
;
}
else
{
params
.
refresh
=
'
0
'
;
}
if
(
$
(
'
input[name=ynEndNum]
'
).
get
(
0
).
checked
){
params
.
ynEndNum
=
'
1
'
;
params
.
endNum
=
$
(
"
#endNum
"
).
val
();
if
(
isNull
(
params
.
endNum
)){
top
.
winui
.
window
.
msg
(
'
请填写答卷份数
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
}
else
{
params
.
ynEndNum
=
'
0
'
;
params
.
endNum
=
'
0
'
;
}
if
(
$
(
'
input[name=ynEndTime]
'
).
get
(
0
).
checked
){
params
.
ynEndTime
=
'
1
'
;
params
.
endTime
=
$
(
"
#endTime
"
).
val
();
if
(
isNull
(
params
.
endTime
)){
top
.
winui
.
window
.
msg
(
'
请填写答卷结束时间
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
}
else
{
params
.
ynEndTime
=
'
0
'
;
params
.
endTime
=
''
;
}
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
dwsurveydirectory005
"
,
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
;
});
}
});
// 设置最小可选的日期
function
minDate
(){
var
now
=
new
Date
();
return
now
.
getFullYear
()
+
"
-
"
+
(
now
.
getMonth
()
+
1
)
+
"
-
"
+
now
.
getDate
();
}
//取消
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
(){
parent
.
layer
.
close
(
index
);
});
});
});
\ No newline at end of file
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/dwsurveydesign.js
已删除
100644 → 0
浏览文件 @
76547e95
此差异已折叠。
点击以展开。
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/dwsurveydesignadd.js
已删除
100644 → 0
浏览文件 @
76547e95
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
jquery
'
,
'
winui
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
params
=
{
surveyName
:
$
(
"
#surveyName
"
).
val
(),
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
dwsurveydirectory002
"
,
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
;
});
//取消
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
(){
parent
.
layer
.
close
(
index
);
});
});
});
\ No newline at end of file
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/dwsurveydesigncopy.js
已删除
100644 → 0
浏览文件 @
76547e95
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
jquery
'
,
'
winui
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
$
(
"
#surveyName
"
).
val
(
"
复制 -
"
+
parent
.
surveyName
);
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
params
=
{
surveyName
:
$
(
"
#surveyName
"
).
val
(),
rowId
:
parent
.
rowId
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
dwsurveydirectory027
"
,
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
;
});
//取消
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
(){
parent
.
layer
.
close
(
index
);
});
});
});
\ No newline at end of file
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/dwsurveydesignlist.js
已删除
100644 → 0
浏览文件 @
76547e95
var
rowId
=
""
;
var
surveyName
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
$
=
layui
.
$
,
form
=
layui
.
form
,
table
=
layui
.
table
;
//表格渲染
table
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
method
:
'
post
'
,
url
:
reqBasePath
+
'
dwsurveydirectory001
'
,
where
:{
surveyName
:
$
(
"
#surveyName
"
).
val
(),
surveyState
:
$
(
"
#surveyState
"
).
val
()},
even
:
true
,
//隔行变色
page
:
true
,
limits
:
[
8
,
16
,
24
,
32
,
40
,
48
,
56
],
limit
:
8
,
cols
:
[[
{
title
:
'
序号
'
,
type
:
'
numbers
'
},
{
field
:
'
surveyName
'
,
width
:
300
,
title
:
'
问卷名称
'
},
{
field
:
'
answerNum
'
,
width
:
140
,
title
:
'
答卷
'
},
{
field
:
'
surveyState
'
,
width
:
120
,
title
:
'
状态
'
},
{
field
:
'
userName
'
,
width
:
120
,
title
:
'
创建人
'
},
{
field
:
'
createTime
'
,
title
:
'
创建时间
'
,
width
:
180
},
{
title
:
'
操作
'
,
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
300
,
toolbar
:
'
#tableBar
'
}
]]
});
table
.
on
(
'
tool(messageTable)
'
,
function
(
obj
)
{
//注:tool是工具条事件名,test是table原始容器的属性 lay-filter="对应的值"
var
data
=
obj
.
data
;
//获得当前行数据
var
layEvent
=
obj
.
event
;
//获得 lay-event 对应的值
if
(
layEvent
===
'
del
'
)
{
//删除
del
(
data
,
obj
);
}
else
if
(
layEvent
===
'
edit
'
)
{
//设计
edit
(
data
);
}
else
if
(
layEvent
===
'
fzWj
'
)
{
//复制问卷
fzWj
(
data
);
}
else
if
(
layEvent
===
'
resolveWj
'
)
{
//收集问卷
resolveWj
(
data
);
}
else
if
(
layEvent
===
'
fxWj
'
)
{
//分析报告
fxWj
(
data
);
}
else
if
(
layEvent
===
'
showFb
'
)
{
//发布
showFb
(
data
,
obj
);
}
else
if
(
layEvent
===
'
endSurvey
'
)
{
//结束调查
endSurvey
(
data
,
obj
);
}
});
//搜索表单
form
.
render
();
form
.
on
(
'
submit(formSearch)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
loadTable
();
}
return
false
;
});
//删除
function
del
(
data
,
obj
){
var
msg
=
obj
?
'
确认删除问卷【
'
+
obj
.
data
.
surveyName
+
'
】吗?
'
:
'
确认删除选中数据吗?
'
;
layer
.
confirm
(
msg
,
{
icon
:
3
,
title
:
'
删除问卷
'
},
function
(
index
)
{
layer
.
close
(
index
);
//向服务端发送删除指令
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
dwsurveydirectory025
"
,
params
:{
rowId
:
data
.
id
},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
top
.
winui
.
window
.
msg
(
"
删除成功
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
}
//设计
function
edit
(
data
){
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/dwsurveydesign/dwsurveydesign.html
"
,
title
:
"
设计问卷
"
,
pageId
:
"
dwsurveydesign
"
,
maxmin
:
true
,
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
top
.
winui
.
window
.
msg
(
"
操作成功
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
if
(
refreshCode
==
'
-9999
'
)
{
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//复制问卷
function
fzWj
(
data
){
rowId
=
data
.
id
;
surveyName
=
data
.
surveyName
;
_openNewWindows
({
url
:
"
../../tpl/dwsurveydesign/dwsurveydesigncopy.html
"
,
title
:
"
复制问卷
"
,
pageId
:
"
dwsurveydesigncopy
"
,
area
:
[
'
500px
'
,
'
300px
'
],
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
top
.
winui
.
window
.
msg
(
"
操作成功
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
if
(
refreshCode
==
'
-9999
'
)
{
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//收集问卷
function
resolveWj
(
data
){
rowId
=
data
.
id
;
surveyName
=
data
.
surveyName
;
_openNewWindows
({
url
:
"
../../tpl/dwsurveydesign/surveyRelove.html
"
,
title
:
"
收集问卷
"
,
pageId
:
"
surveyRelove
"
,
area
:
[
'
500px
'
,
'
500px
'
],
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
}
else
if
(
refreshCode
==
'
-9999
'
)
{
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//分析报告
function
fxWj
(
data
){
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/dwsurveydesign/surveyReport.html
"
,
title
:
"
分析报告
"
,
pageId
:
"
surveyReport
"
,
maxmin
:
true
,
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
}
else
if
(
refreshCode
==
'
-9999
'
)
{
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//发布
function
showFb
(
data
,
obj
){
var
msg
=
obj
?
'
确认发布问卷【
'
+
obj
.
data
.
surveyName
+
'
】吗?
'
:
'
确认发布选中数据吗?
'
;
layer
.
confirm
(
msg
,
{
icon
:
3
,
title
:
'
问卷发布
'
},
function
(
index
)
{
layer
.
close
(
index
);
//向服务端发送删除指令
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
dwsurveydirectory023
"
,
params
:{
rowId
:
data
.
id
},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
top
.
winui
.
window
.
msg
(
"
发布成功
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
}
//结束调查
function
endSurvey
(
data
,
obj
){
var
msg
=
obj
?
'
确认结束问卷【
'
+
obj
.
data
.
surveyName
+
'
】的调查吗?
'
:
'
确认结束选中数据吗?
'
;
layer
.
confirm
(
msg
,
{
icon
:
3
,
title
:
'
结束调查
'
},
function
(
index
)
{
layer
.
close
(
index
);
//向服务端发送删除指令
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
dwsurveydirectory030
"
,
params
:{
surveyId
:
data
.
id
},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
top
.
winui
.
window
.
msg
(
"
结束成功
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
}
//刷新数据
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
(){
loadTable
();
});
//新增
$
(
"
body
"
).
on
(
"
click
"
,
"
#addBean
"
,
function
(){
_openNewWindows
({
url
:
"
../../tpl/dwsurveydesign/dwsurveydesignadd.html
"
,
title
:
"
新增问卷
"
,
pageId
:
"
dwsurveydesignadd
"
,
area
:
[
'
500px
'
,
'
300px
'
],
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
top
.
winui
.
window
.
msg
(
"
操作成功
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
if
(
refreshCode
==
'
-9999
'
)
{
top
.
winui
.
window
.
msg
(
"
操作失败
"
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
function
loadTable
(){
table
.
reload
(
"
messageTable
"
,
{
where
:{
surveyName
:
$
(
"
#surveyName
"
).
val
(),
surveyState
:
$
(
"
#surveyState
"
).
val
()}});
}
exports
(
'
dwsurveydesignlist
'
,
{});
});
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/dwsurveydesignrulecode.js
已删除
100644 → 0
浏览文件 @
76547e95
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
jquery
'
,
'
winui
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
if
(
$
(
"
#surveyName
"
).
val
()
==
parent
.
ruleCode
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
else
{
layer
.
msg
(
"
密码输入错误。
"
,
{
icon
:
2
,
time
:
2000
});
}
}
return
false
;
});
//取消
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
(){
parent
.
layer
.
close
(
index
);
});
});
});
\ No newline at end of file
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/modelUIDialog.js
已删除
100644 → 0
浏览文件 @
76547e95
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
jquery
'
,
'
winui
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
var
thDialogObj
=
parent
.
quOptionDesign
;
var
thObjClass
=
thDialogObj
.
attr
(
"
class
"
);
$
(
"
.layui-form
"
).
hide
();
if
(
thObjClass
.
indexOf
(
"
dwFbMenuBtn
"
)
>=
0
)
{
$
(
"
#showForm1
"
).
show
();
var
quItemBody
=
$
(
thDialogObj
).
parents
(
"
.surveyQuItemBody
"
);
var
checkType_val
=
quItemBody
.
find
(
"
input[name='checkType']
"
).
val
();
var
answerInputWidth_val
=
quItemBody
.
find
(
"
input[name='answerInputWidth']
"
).
val
();
var
answerInputRow_val
=
quItemBody
.
find
(
"
input[name='answerInputRow']
"
).
val
();
if
(
checkType_val
==
""
)
{
checkType_val
=
"
NO
"
;
}
var
checkType
=
$
(
"
select[name='quFill_checkType']
"
);
checkType
.
val
(
checkType_val
);
var
qu_inputWidth
=
$
(
"
input[name='qu_inputWidth']
"
);
var
qu_inputRow
=
$
(
"
input[name='qu_inputRow']
"
);
if
(
answerInputWidth_val
==
""
)
{
answerInputWidth_val
=
"
300
"
;
}
if
(
answerInputRow_val
==
""
)
{
answerInputRow_val
=
"
1
"
;
}
qu_inputWidth
.
val
(
answerInputWidth_val
);
qu_inputRow
.
val
(
answerInputRow_val
);
resetQuItemHover
(
quItemBody
);
$
(
thDialogObj
).
parents
(
"
.quCoItemUlLi
"
).
addClass
(
"
menuBtnClick
"
);
}
else
if
(
thObjClass
.
indexOf
(
"
quCoOptionEdit
"
)
>=
0
)
{
$
(
"
#showForm2
"
).
show
();
//设置回显值 isNote checkType
var
quOption_isNote
=
$
(
"
input[name='quOption_isNote']
"
);
var
quOption_checkType
=
$
(
"
select[name='quOption_checkType']
"
);
var
quOption_isRequiredFill
=
$
(
"
input[name='quOption_isRequiredFill']
"
);
var
quOptionParent
=
$
(
thDialogObj
).
parent
();
var
isNote_val
=
quOptionParent
.
find
(
"
input[name='isNote']
"
).
val
();
var
checkType_val
=
quOptionParent
.
find
(
"
input[name='checkType']
"
).
val
();
var
isRequiredFill_val
=
quOptionParent
.
find
(
"
input[name='isRequiredFill']
"
).
val
();
if
(
isNote_val
==
"
1
"
)
{
quOption_isNote
.
prop
(
"
checked
"
,
true
);
$
(
"
#quOption_checkType_div
"
).
show
();
$
(
"
#quOption_isRequiredFill_div
"
).
show
();
}
else
{
quOption_isNote
.
prop
(
"
checked
"
,
false
);
$
(
"
#quOption_checkType_div
"
).
hide
();
$
(
"
#quOption_isRequiredFill_div
"
).
hide
();
}
if
(
checkType_val
==
""
)
{
checkType_val
=
"
NO
"
;
}
quOption_checkType
.
val
(
checkType_val
);
if
(
isRequiredFill_val
==
"
1
"
)
{
quOption_isRequiredFill
.
prop
(
"
checked
"
,
true
);
}
else
{
quOption_isRequiredFill
.
prop
(
"
checked
"
,
false
);
}
}
form
.
render
();
form
.
on
(
'
checkbox(quOption_isNote)
'
,
function
(
data
)
{
var
check
=
data
.
elem
.
checked
;
if
(
check
){
//选中
$
(
"
#quOption_checkType_div
"
).
show
();
$
(
"
#quOption_isRequiredFill_div
"
).
show
();
}
else
{
$
(
"
#quOption_checkType_div
"
).
hide
();
$
(
"
#quOption_isRequiredFill_div
"
).
hide
();
}
});
form
.
on
(
'
submit(formAddBean1)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
quItemBody
=
$
(
thDialogObj
).
parents
(
"
.surveyQuItemBody
"
);
//设置回显值 isNote checkType
var
quFill_checkType
=
$
(
"
select[name='quFill_checkType']
"
);
var
qu_inputWidth
=
$
(
"
input[name='qu_inputWidth']
"
);
var
qu_inputRow
=
$
(
"
input[name='qu_inputRow']
"
);
var
checkType
=
quItemBody
.
find
(
"
input[name='checkType']
"
);
//输入框 input 大小调整 quFillblankAnswerInput quFillblankAnswerTextarea
var
answerInputWidth
=
quItemBody
.
find
(
"
input[name='answerInputWidth']
"
);
var
answerInputRow
=
quItemBody
.
find
(
"
input[name='answerInputRow']
"
);
if
(
checkType
.
val
()
!=
quFill_checkType
.
val
()
||
answerInputWidth
.
val
()
!=
qu_inputWidth
.
val
()
||
answerInputRow
.
val
()
!=
qu_inputRow
.
val
())
{
quItemBody
.
find
(
"
input[name='saveTag']
"
).
val
(
0
);
}
var
checkTypeVal
=
quFill_checkType
.
val
();
if
(
checkTypeVal
==
""
)
{
checkTypeVal
=
"
NO
"
;
}
checkType
.
val
(
checkTypeVal
);
answerInputWidth
.
val
(
qu_inputWidth
.
val
());
answerInputRow
.
val
(
qu_inputRow
.
val
());
if
(
qu_inputRow
.
val
()
>
1
)
{
quItemBody
.
find
(
"
.quFillblankAnswerTextarea
"
).
show
();
quItemBody
.
find
(
"
.quFillblankAnswerInput
"
).
hide
();
quItemBody
.
find
(
"
.quFillblankAnswerTextarea
"
).
attr
(
"
rows
"
,
qu_inputRow
.
val
());
quItemBody
.
find
(
"
.quFillblankAnswerTextarea
"
).
width
(
qu_inputWidth
.
val
());
}
else
{
quItemBody
.
find
(
"
.quFillblankAnswerTextarea
"
).
hide
();
quItemBody
.
find
(
"
.quFillblankAnswerInput
"
).
show
();
quItemBody
.
find
(
"
.quFillblankAnswerInput
"
).
width
(
qu_inputWidth
.
val
());
}
quItemBody
.
find
(
"
.quCoItemUlLi
"
).
removeClass
(
"
hover
"
);
resetQuItemHover
(
null
);
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
return
false
;
});
form
.
on
(
'
submit(formAddBean2)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
quItemBody
=
$
(
thDialogObj
).
parents
(
"
.surveyQuItemBody
"
);
var
quOptionParent
=
$
(
thDialogObj
).
parent
();
//设置回显值 isNote checkType
var
quOption_isNote
=
$
(
"
input[name='quOption_isNote']
"
);
var
quOption_checkType
=
$
(
"
select[name='quOption_checkType']
"
);
var
quOption_isRequiredFill
=
$
(
"
input[name='quOption_isRequiredFill']
"
);
var
isNote
=
quOptionParent
.
find
(
"
input[name='isNote']
"
);
var
checkType
=
quOptionParent
.
find
(
"
input[name='checkType']
"
);
var
isRequiredFill
=
quOptionParent
.
find
(
"
input[name='isRequiredFill']
"
);
if
(
quOption_isNote
.
prop
(
"
checked
"
)
&&
(
isNote
.
val
()
==
"
0
"
||
isNote
.
val
()
==
""
))
{
quItemBody
.
find
(
"
input[name='saveTag']
"
).
val
(
0
);
quOptionParent
.
find
(
"
input[name='quItemSaveTag']
"
).
val
(
0
);
}
if
(
quOption_checkType
.
val
()
!=
checkType
.
val
())
{
quItemBody
.
find
(
"
input[name='saveTag']
"
).
val
(
0
);
quOptionParent
.
find
(
"
input[name='quItemSaveTag']
"
).
val
(
0
);
}
if
(
quOption_isRequiredFill
.
val
()
!=
isRequiredFill
.
val
())
{
quItemBody
.
find
(
"
input[name='saveTag']
"
).
val
(
0
);
quOptionParent
.
find
(
"
input[name='quItemSaveTag']
"
).
val
(
0
);
}
if
(
quOption_isNote
.
prop
(
"
checked
"
))
{
isNote
.
val
(
1
);
}
else
{
isNote
.
val
(
0
);
}
var
checkTypeVal
=
quOption_checkType
.
val
();
if
(
checkTypeVal
==
""
)
{
checkTypeVal
=
"
NO
"
;
}
checkType
.
val
(
checkTypeVal
);
if
(
quOption_isRequiredFill
.
prop
(
"
checked
"
))
{
isRequiredFill
.
val
(
1
);
}
else
{
isRequiredFill
.
val
(
0
);
}
//显示填空框
quOptionParent
.
find
(
"
.optionInpText
"
).
show
();
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}
return
false
;
});
function
resetQuItemHover
(
quItemBody
){
$
(
"
.surveyQuItemBody
"
).
removeClass
(
"
hover
"
);
$
(
"
.surveyQuItemBody
"
).
find
(
"
input[name='hoverTag']
"
).
val
(
"
0
"
);
if
(
quItemBody
!=
null
){
quItemBody
.
addClass
(
"
hover
"
);
quItemBody
.
find
(
"
input[name='hoverTag']
"
).
val
(
"
hover
"
);
}
}
//取消
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
(){
parent
.
layer
.
close
(
index
);
});
});
});
\ No newline at end of file
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/surveyRelove.js
已删除
100644 → 0
浏览文件 @
76547e95
var
url
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
jquery
'
,
'
winui
'
,
'
ClipboardJS
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
var
rulYm
=
""
;
if
(
reqBasePath
.
indexOf
(
"
localhost
"
)
!=
-
1
){
rulYm
=
"
http://127.0.0.1:8081/
"
}
else
{
rulYm
=
reqBasePath
;
}
//刷新页面参数
url
=
rulYm
+
'
tpl/dwsurveydesign/surveyTemplate.html?rowId=
'
+
parent
.
rowId
;
$
(
"
#pcAddress
"
).
val
(
url
);
$
(
"
#copyUrl
"
).
attr
(
"
data-clipboard-text
"
,
url
);
//加入分享js
var
content
=
"
大家好,我刚刚通过skyeye制作了一份调查问卷【
"
+
parent
.
surveyName
+
"
】,需要您的帮助,您的意见非常重要。快快来帮忙回答。
"
;
var
params
=
{
text
:
content
,
url
:
url
,
pic
:
'
https://images.gitee.com/uploads/images/2018/1207/083137_48330589_1541735.jpeg
'
};
$
(
"
#bdshare
"
).
attr
(
"
data
"
,
JSON
.
stringify
(
params
));
form
.
render
();
document
.
getElementById
(
"
bdshell_js
"
).
src
=
"
http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=
"
+
Math
.
ceil
(
new
Date
()
/
3600000
);
//打开链接
$
(
"
body
"
).
on
(
"
click
"
,
"
#openUrl
"
,
function
(
e
){
window
.
open
(
url
);
});
//复制链接
var
clipboard
=
new
ClipboardJS
(
'
#copyUrl
'
);
clipboard
.
on
(
'
success
'
,
function
(
e
)
{
top
.
winui
.
window
.
msg
(
"
复制成功
"
,
{
icon
:
1
,
time
:
2000
});
});
clipboard
.
on
(
'
error
'
,
function
(
e
)
{
top
.
winui
.
window
.
msg
(
"
浏览器不支持!
"
,
{
icon
:
2
,
time
:
2000
});
});
});
});
\ No newline at end of file
skyeye-promote/skyeye-web/src/main/resources/template/js/dwsurveydesign/surveyReport.js
已删除
100644 → 0
浏览文件 @
76547e95
var
quIndex
=
0
;
//问题序号
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
echarts
:
'
../echarts/echarts
'
,
echartsTheme
:
'
../echarts/echartsTheme
'
,
}).
define
([
'
jquery
'
,
'
winui
'
,
'
echarts
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
showGrid
({
id
:
"
dwBodyUser
"
,
url
:
reqBasePath
+
"
dwsurveydirectory026
"
,
params
:
{
rowId
:
parent
.
rowId
},
pagination
:
false
,
template
:
getFileContent
(
'
tpl/dwsurveydesign/surveyReport.tpl
'
),
ajaxSendLoadBefore
:
function
(
hdb
){
hdb
.
registerHelper
(
"
showIndex
"
,
function
(
v1
,
options
)
{
quIndex
++
;
return
quIndex
;
});
hdb
.
registerHelper
(
"
showXhIndex
"
,
function
(
v1
,
options
)
{
return
parseInt
(
v1
)
+
1
;
});
hdb
.
registerHelper
(
'
compare1
'
,
function
(
v1
,
v2
,
options
)
{
if
(
v1
==
v2
){
return
options
.
fn
(
this
);
}
else
{
return
options
.
inverse
(
this
);
}
});
hdb
.
registerHelper
(
'
compare7
'
,
function
(
v1
,
options
)
{
if
(
v1
!=
'
16
'
&&
v1
!=
'
17
'
){
return
options
.
fn
(
this
);
}
else
{
return
options
.
inverse
(
this
);
}
});
},
ajaxSendAfter
:
function
(
json
){
if
(
json
.
bean
.
surveyState
==
'
2
'
){
$
(
"
#surveyState
"
).
html
(
"
结束
"
);
}
/**
* 统计图切换
*/
$
(
"
.linechart_pic,.piechart_pic,.barchart_pic,.columnchart_pic
"
).
click
(
function
()
{
var
th
=
$
(
this
);
var
thClass
=
th
.
attr
(
"
class
"
);
var
quId
=
th
.
parents
(
"
.surveyResultQu
"
).
find
(
"
input[name='quId']
"
).
val
();
var
amchartdivId
=
null
;
if
(
thClass
.
indexOf
(
"
linechart_pic
"
)
>
0
)
{
amchartdivId
=
"
line_chart_
"
+
quId
;
}
else
if
(
thClass
.
indexOf
(
"
piechart_pic
"
)
>
0
)
{
amchartdivId
=
"
pie_chart_
"
+
quId
;
}
else
if
(
thClass
.
indexOf
(
"
barchart_pic
"
)
>
0
)
{
amchartdivId
=
"
bar_chart_
"
+
quId
;
}
else
if
(
thClass
.
indexOf
(
"
columnchart_pic
"
)
>
0
)
{
amchartdivId
=
"
column_chart_
"
+
quId
;
}
th
.
parent
().
find
(
"
.dw_btn026.active
"
).
removeClass
(
"
active
"
);
th
.
addClass
(
"
active
"
);
if
(
amchartdivId
!=
null
)
{
var
amchartdivObj
=
$
(
"
#
"
+
amchartdivId
);
if
(
!
amchartdivObj
[
0
])
{
var
msg
=
{};
$
(
"
#amchart_
"
+
quId
).
find
(
"
.higChartSvg
"
).
hide
();
if
(
thClass
.
indexOf
(
"
linechart_pic
"
)
>
0
)
{
higLineChart
(
msg
,
quId
);
}
else
if
(
thClass
.
indexOf
(
"
piechart_pic
"
)
>
0
)
{
higPieChart
(
msg
,
quId
);
}
else
if
(
thClass
.
indexOf
(
"
barchart_pic
"
)
>
0
)
{
higBarChart
(
msg
,
quId
);
}
else
if
(
thClass
.
indexOf
(
"
columnchart_pic
"
)
>
0
)
{
higColumnChart
(
msg
,
quId
);
}
}
else
{
$
(
"
#amchart_
"
+
quId
).
find
(
"
.higChartSvg
"
).
hide
();
amchartdivObj
.
show
();
}
}
return
false
;
});
setTimeout
(
function
(){
$
(
"
.columnchart_pic
"
).
click
();
},
2000
);
resetQuNum
();
}
});
function
resetQuNum
(){
var
quCoNums
=
$
(
"
.quCoNum
"
);
$
.
each
(
quCoNums
,
function
(
i
,
item
){
$
(
this
).
html
((
i
+
1
)
+
"
、
"
);
});
}
function
getHighchartsData
(
quItemBody
,
charType
)
{
var
quType
=
quItemBody
.
find
(
"
input[name='quType']
"
).
val
();
var
categories
=
[];
var
series
=
new
Array
();
var
seriesData
=
new
Array
();
var
tagText
=
"
次数
"
;
var
legendData
=
new
Array
();
var
seriesType
=
'
bar
'
;
if
(
charType
===
"
Line
"
)
{
seriesType
=
'
line
'
;
}
if
(
quType
===
"
11
"
||
quType
===
"
13
"
||
quType
===
"
18
"
)
{
if
(
charType
===
"
PIE
"
)
{
seriesData
=
new
Array
();
var
rowItemTrs
=
quItemBody
.
find
(
"
.rowItemTr
"
);
$
.
each
(
rowItemTrs
,
function
()
{
var
rowItemOptionName
=
$
(
this
).
find
(
"
.rowItemOptionName
"
).
text
();
var
thColumnItemTrs
=
$
(
this
).
next
().
find
(
"
.columnItemTr
"
);
$
.
each
(
thColumnItemTrs
,
function
()
{
var
columnItemOptionName
=
$
(
this
).
find
(
"
.columnItemOptionName
"
).
text
();
var
anCount
=
$
(
this
).
find
(
"
input[name='columnItemAnCount']
"
).
val
();
var
data
=
{};
data
[
"
value
"
]
=
parseInt
(
anCount
);
data
[
"
name
"
]
=
rowItemOptionName
+
"
|
"
+
columnItemOptionName
;
series
.
push
(
data
);
});
});
}
else
{
var
columnItemTrs
=
quItemBody
.
find
(
"
.anColumnTable:eq(0) .columnItemTr
"
);
$
.
each
(
columnItemTrs
,
function
()
{
var
columnItemOptionName
=
$
(
this
).
find
(
"
.columnItemOptionName
"
).
text
();
categories
.
push
(
columnItemOptionName
);
});
var
rowItemTrs
=
quItemBody
.
find
(
"
.rowItemTr
"
);
$
.
each
(
rowItemTrs
,
function
()
{
var
rowItemOptionName
=
$
(
this
).
find
(
"
.rowItemOptionName
"
).
text
();
var
thColumnItemTrs
=
$
(
this
).
next
().
find
(
"
.columnItemTr
"
);
seriesData
=
new
Array
();
$
.
each
(
thColumnItemTrs
,
function
()
{
var
anCount
=
$
(
this
).
find
(
"
input[name='columnItemAnCount']
"
).
val
();
seriesData
.
push
(
parseInt
(
anCount
));
});
series
.
push
({
//指定数据列
name
:
rowItemOptionName
,
//数据列名
type
:
seriesType
,
data
:
seriesData
//数据
});
legendData
.
push
(
rowItemOptionName
);
});
}
}
else
{
var
seriesDataTemp
=
"
[
"
;
var
quRadioOptions
=
quItemBody
.
find
(
"
.quTrOptions
"
);
$
.
each
(
quRadioOptions
,
function
(
i
,
item
)
{
var
quOptionName
=
$
(
this
).
find
(
"
.optionName
"
).
text
();
var
anCount
=
$
(
this
).
find
(
"
input[name='quItemAnCount']
"
).
val
();
if
(
anCount
==
""
)
{
anCount
=
0
;
}
categories
.
push
(
quOptionName
);
if
(
quType
===
"
8
"
)
{
var
avgScore
=
$
(
this
).
find
(
"
input[name='quItemAvgScore']
"
).
val
();
//平均分 setAvgScore
avgScore
=
parseFloat
(
avgScore
).
toFixed
(
2
);
if
(
avgScore
===
"
NaN
"
)
{
avgScore
=
"
0.00
"
;
}
if
(
charType
===
"
PIE
"
)
{
var
data
=
{};
data
[
"
value
"
]
=
parseFloat
(
avgScore
);
data
[
"
name
"
]
=
quOptionName
;
seriesData
.
push
(
data
);
}
else
{
seriesData
.
push
(
parseFloat
(
avgScore
));
}
tagText
=
"
分数
"
;
}
else
if
(
quType
===
"
9
"
)
{
if
(
charType
===
"
PIE
"
)
{
var
data
=
{};
data
[
"
value
"
]
=
parseInt
(
anCount
);
data
[
"
name
"
]
=
quOptionName
;
seriesData
.
push
(
data
);
}
else
{
seriesData
.
push
(
parseInt
(
anCount
));
}
tagText
=
"
排名
"
;
}
else
{
if
(
charType
===
"
PIE
"
)
{
var
data
=
{};
data
[
"
value
"
]
=
parseInt
(
anCount
);
data
[
"
name
"
]
=
quOptionName
;
seriesData
.
push
(
data
);
}
else
{
seriesData
.
push
(
parseInt
(
anCount
));
}
}
});
if
(
charType
===
"
PIE
"
)
{
series
=
seriesData
;
}
else
if
(
charType
===
"
BAR
"
)
{
series
=
[{
name
:
tagText
,
type
:
'
bar
'
,
data
:
seriesData
}];
}
else
{
series
=
[{
name
:
tagText
,
type
:
seriesType
,
data
:
seriesData
}]
}
}
return
[
categories
,
series
,
tagText
,
legendData
];
}
function
higColumnChart
(
resultJson
,
quId
)
{
var
chartdivId
=
"
column_chart_
"
+
quId
;
$
(
"
#amchart_
"
+
quId
).
prepend
(
"
<div id='
"
+
chartdivId
+
"
' class=
\"
higChartSvg
\"
></div>
"
);
$
(
"
#
"
+
chartdivId
).
css
({
"
height
"
:
"
300px
"
});
var
quItemBody
=
$
(
"
#quTr_
"
+
quId
);
var
quTitle
=
quItemBody
.
find
(
"
.quCoTitleText
"
).
text
();
var
quTypeName
=
quItemBody
.
find
(
"
input[name='quTypeCnName']
"
).
val
();
var
datas
=
getHighchartsData
(
quItemBody
,
"
column
"
);
var
categories
=
datas
[
0
];
var
series
=
datas
[
1
];
var
tagText
=
datas
[
2
];
var
legendData
=
datas
[
3
];
var
myChart
=
echarts
.
init
(
$
(
'
#
'
+
chartdivId
)[
0
],
"
shine
"
);
// 指定图表的配置项和数据
var
option
=
{
title
:
{
text
:
quTitle
,
top
:
8
,
textStyle
:
{
fontSize
:
16
},
x
:
'
center
'
},
toolbox
:
{
show
:
true
,
feature
:
{
saveAsImage
:
{
show
:
true
}
}
},
color
:
[
'
#7cb5ec
'
],
backgroundColor
:
'
#fff
'
,
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'
shadow
'
// 默认为直线,可选为:'line' | 'shadow'
},
top
:
20
},
grid
:
{
left
:
'
3%
'
,
right
:
'
3%
'
,
bottom
:
'
5%
'
,
containLabel
:
true
},
xAxis
:
{
type
:
'
category
'
,
data
:
categories
,
axisTick
:
{
alignWithLabel
:
true
},
nameGap
:
20
,
axisLabel
:
{
interval
:
0
,
margin
:
15
},
axisLine
:
{
show
:
false
,
lineStyle
:
{
width
:
1
}
},
axisTick
:
{
show
:
false
}
},
yAxis
:
{
splitNumber
:
5
,
type
:
'
value
'
,
axisLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
name
:
tagText
},
legend
:
{
bottom
:
0
,
data
:
legendData
},
series
:
series
};
// 使用刚指定的配置项和数据显示图表。
myChart
.
setOption
(
option
);
}
function
higPieChart
(
resultJson
,
quId
)
{
var
chartdivId
=
"
pie_chart_
"
+
quId
;
$
(
"
#amchart_
"
+
quId
).
prepend
(
"
<div id='
"
+
chartdivId
+
"
' class=
\"
higChartSvg
\"
></div>
"
);
$
(
"
#
"
+
chartdivId
).
css
({
"
height
"
:
"
300px
"
});
var
quItemBody
=
$
(
"
#quTr_
"
+
quId
);
var
quTitle
=
quItemBody
.
find
(
"
.quCoTitleText
"
).
text
();
var
quTypeName
=
quItemBody
.
find
(
"
input[name='quTypeCnName']
"
).
val
();
var
datas
=
getHighchartsData
(
quItemBody
,
"
PIE
"
);
var
series
=
datas
[
1
];
var
tagText
=
datas
[
2
];
var
categories
=
datas
[
0
]
var
legendData
=
datas
[
3
];
var
myChart
=
echarts
.
init
(
$
(
'
#
'
+
chartdivId
)[
0
],
"
shine
"
);
var
option
=
{
title
:
{
text
:
quTitle
,
top
:
8
,
textStyle
:
{
fontSize
:
16
},
x
:
'
center
'
},
tooltip
:
{
trigger
:
'
item
'
,
formatter
:
"
{a} <br/>{b} : {c} ({d}%)
"
},
backgroundColor
:
'
#fff
'
,
toolbox
:
{
show
:
true
,
feature
:
{
saveAsImage
:
{
show
:
true
}
}
},
legend
:
{
x
:
'
center
'
,
y
:
'
bottom
'
,
data
:
categories
//['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
},
series
:
// series
[{
name
:
tagText
,
type
:
'
pie
'
,
radius
:
'
55%
'
,
center
:
[
'
50%
'
,
'
60%
'
],
data
:
series
,
itemStyle
:
{
emphasis
:
{
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowColor
:
'
rgba(0, 0, 0, 0.5)
'
}
}
}]
};
myChart
.
setOption
(
option
);
}
function
higBarChart
(
resultJson
,
quId
)
{
var
chartdivId
=
"
bar_chart_
"
+
quId
;
$
(
"
#amchart_
"
+
quId
).
prepend
(
"
<div id='
"
+
chartdivId
+
"
' class=
\"
higChartSvg
\"
></div>
"
);
$
(
"
#
"
+
chartdivId
).
css
({
"
height
"
:
"
300px
"
});
var
quItemBody
=
$
(
"
#quTr_
"
+
quId
);
var
quTitle
=
quItemBody
.
find
(
"
.quCoTitleText
"
).
text
();
var
quTypeName
=
quItemBody
.
find
(
"
input[name='quTypeCnName']
"
).
val
();
var
datas
=
getHighchartsData
(
quItemBody
,
"
BAR
"
);
var
categories
=
datas
[
0
];
var
series
=
datas
[
1
];
var
tagText
=
datas
[
2
];
var
legendData
=
datas
[
3
];
var
myChart
=
echarts
.
init
(
$
(
'
#
'
+
chartdivId
)[
0
],
"
shine
"
);
var
option
=
{
title
:
{
text
:
quTitle
,
top
:
8
,
textStyle
:
{
fontSize
:
16
},
x
:
'
center
'
},
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
type
:
'
shadow
'
}
},
backgroundColor
:
'
#fff
'
,
color
:
[
'
#7cb5ec
'
],
legend
:
{
data
:
[
'
2011年
'
,
'
2012年
'
]
},
grid
:
{
left
:
'
3%
'
,
right
:
'
4%
'
,
bottom
:
'
10%
'
,
containLabel
:
true
},
toolbox
:
{
show
:
true
,
feature
:
{
saveAsImage
:
{
show
:
true
}
}
},
xAxis
:
{
type
:
'
value
'
,
axisTick
:
{
alignWithLabel
:
true
},
nameGap
:
12
,
axisLabel
:
{
interval
:
0
,
margin
:
15
},
axisLine
:
{
show
:
false
,
lineStyle
:
{
width
:
1
}
},
axisTick
:
{
show
:
false
},
splitLine
:
{
show
:
true
}
},
yAxis
:
{
type
:
'
category
'
,
data
:
categories
},
legend
:
{
bottom
:
2
,
data
:
legendData
},
series
:
series
};
myChart
.
setOption
(
option
);
}
function
higLineChart
(
resultJson
,
quId
)
{
//根据quId得到数据对象,并且解析
var
chartdivId
=
"
line_chart_
"
+
quId
;
$
(
"
#amchart_
"
+
quId
).
prepend
(
"
<div id='
"
+
chartdivId
+
"
' class=
\"
higChartSvg
\"
></div>
"
);
$
(
"
#
"
+
chartdivId
).
css
({
"
height
"
:
"
300px
"
});
var
quItemBody
=
$
(
"
#quTr_
"
+
quId
);
var
quTitle
=
quItemBody
.
find
(
"
.quCoTitleText
"
).
text
();
var
quTypeName
=
quItemBody
.
find
(
"
input[name='quTypeCnName']
"
).
val
();
var
datas
=
getHighchartsData
(
quItemBody
,
"
Line
"
);
var
categories
=
datas
[
0
];
var
series
=
datas
[
1
];
var
tagText
=
datas
[
2
];
var
legendData
=
datas
[
3
];
var
myChart
=
echarts
.
init
(
$
(
'
#
'
+
chartdivId
)[
0
],
"
shine
"
);
// 指定图表的配置项和数据
var
option
=
{
title
:
{
text
:
quTitle
,
top
:
8
,
textStyle
:
{
fontSize
:
16
},
x
:
'
center
'
},
toolbox
:
{
show
:
true
,
feature
:
{
saveAsImage
:
{
show
:
true
}
}
},
backgroundColor
:
'
#fff
'
,
color
:
[
'
#3398DB
'
],
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'
shadow
'
// 默认为直线,可选为:'line' | 'shadow'
},
top
:
20
},
grid
:
{
left
:
'
3%
'
,
right
:
'
4%
'
,
bottom
:
'
3%
'
,
containLabel
:
true
},
xAxis
:
{
type
:
'
category
'
,
data
:
categories
,
axisTick
:
{
alignWithLabel
:
true
},
nameGap
:
20
,
axisLabel
:
{
interval
:
0
,
margin
:
15
},
axisLine
:
{
show
:
false
,
lineStyle
:
{
width
:
1
}
},
axisTick
:
{
show
:
false
},
splitLine
:
{
show
:
true
}
},
yAxis
:
{
minInterval
:
1
,
name
:
'
次数
'
},
legend
:
{
bottom
:
0
,
data
:
legendData
},
series
:
series
};
// 使用刚指定的配置项和数据显示图表。
myChart
.
setOption
(
option
);
}
function
substring
(
json
)
{
var
bufLen
=
json
.
length
;
var
lastIndex
=
json
.
lastIndexOf
(
"
,
"
);
if
(
bufLen
==
(
lastIndex
+
1
))
{
json
=
json
.
substring
(
0
,
lastIndex
);
}
return
json
;
}
});
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录