Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5portal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
管理员
jfV5portal
Commits
bd72156a
Commit
bd72156a
authored
Sep 28, 2018
by
郎靓静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改移动端投票
parent
192f79c9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
13 deletions
+12
-13
vote.js
WebContent/jfcas04_mobile/js/vote.js
+5
-5
vote_browse.js
WebContent/jfcas04_mobile/js/vote_browse.js
+2
-2
vote_details.js
WebContent/jfcas04_mobile/js/vote_details.js
+5
-5
vote_major.js
WebContent/jfcas04_mobile/js/vote_major.js
+0
-1
No files found.
WebContent/jfcas04_mobile/js/vote.js
View file @
bd72156a
...
@@ -37,11 +37,11 @@ function init_vote_editor_content(){
...
@@ -37,11 +37,11 @@ function init_vote_editor_content(){
var
results
=
voteModule
.
voteDataAction
.
listAll
({
var
results
=
voteModule
.
voteDataAction
.
listAll
({
FIELD_UUID
:
$
.
getUrlParam
(
'voteId'
)
FIELD_UUID
:
$
.
getUrlParam
(
'voteId'
)
}).
rowSet
;
}).
rowSet
;
console
.
log
(
results
);
var
v_jquery
=
{};
var
v_jquery
=
{};
v_jquery
.
FIELD_MANAGE_ID
=
$
.
getUrlParam
(
'voteId'
);
v_jquery
.
FIELD_MANAGE_ID
=
$
.
getUrlParam
(
'voteId'
);
var
infos
=
voteModule
.
voteDataAction
.
listItem
(
v_jquery
).
listItems
;
var
infos
=
voteModule
.
voteDataAction
.
listItem
(
v_jquery
).
listItems
;
console
.
log
(
infos
);
//查看每个选项的被选情况
//查看每个选项的被选情况
...
@@ -157,7 +157,7 @@ function savesend() {
...
@@ -157,7 +157,7 @@ function savesend() {
v_jquery
.
FIELD_MIN_COUNT
=
$
(
'#vote_select2'
).
val
();
v_jquery
.
FIELD_MIN_COUNT
=
$
(
'#vote_select2'
).
val
();
v_jquery
.
FIELD_MAX_COUNT
=
$
(
'#vote_select1'
).
val
();
v_jquery
.
FIELD_MAX_COUNT
=
$
(
'#vote_select1'
).
val
();
v_jquery
.
FIELD_END_TIME
=
$
(
'#input1'
).
val
();
v_jquery
.
FIELD_END_TIME
=
$
(
'#input1'
).
val
();
console
.
log
(
v_jquery
);
//判断发布的投票信息是否完整
//判断发布的投票信息是否完整
if
(
v_jquery
.
FIELD_CONTENT
==
''
||
v_jquery
.
FIELD_SUB_TITLE
==
''
||
v_jquery
.
FIELD_MIN_COUNT
==
''
||
v_jquery
.
FIELD_MAX_COUNT
==
''
||
v_jquery
.
FIELD_END_TIME
==
''
){
if
(
v_jquery
.
FIELD_CONTENT
==
''
||
v_jquery
.
FIELD_SUB_TITLE
==
''
||
v_jquery
.
FIELD_MIN_COUNT
==
''
||
v_jquery
.
FIELD_MAX_COUNT
==
''
||
v_jquery
.
FIELD_END_TIME
==
''
){
$
(
'.vote_editor_judge'
).
css
(
'display'
,
'block'
);
$
(
'.vote_editor_judge'
).
css
(
'display'
,
'block'
);
...
@@ -207,7 +207,7 @@ function savesend() {
...
@@ -207,7 +207,7 @@ function savesend() {
swal
(
"Good!"
,
"新增成功!"
,
"success"
,
function
(){
swal
(
"Good!"
,
"新增成功!"
,
"success"
,
function
(){
alert
()
alert
()
});
});
console
.
log
(
result
)
if
(
result
.
VALUE
==
'保存成功'
){
if
(
result
.
VALUE
==
'保存成功'
){
swal
({
swal
({
title
:
""
,
title
:
""
,
...
@@ -227,7 +227,7 @@ function savesend() {
...
@@ -227,7 +227,7 @@ function savesend() {
v_jquery
.
FIELD_UUID
=
results
[
0
].
UUID
;
v_jquery
.
FIELD_UUID
=
results
[
0
].
UUID
;
v_jquery
.
FIELD_OPETYPE
=
'updata'
;
v_jquery
.
FIELD_OPETYPE
=
'updata'
;
var
result
=
voteModule
.
voteActAction
.
updateVote
(
v_jquery
);
var
result
=
voteModule
.
voteActAction
.
updateVote
(
v_jquery
);
console
.
log
(
result
)
//$.fancybox.open('编辑成功!');
//$.fancybox.open('编辑成功!');
if
(
result
.
VALUE
==
'修改成功'
){
if
(
result
.
VALUE
==
'修改成功'
){
swal
({
swal
({
...
...
WebContent/jfcas04_mobile/js/vote_browse.js
View file @
bd72156a
...
@@ -11,7 +11,7 @@ function init_vote_browse_content(){
...
@@ -11,7 +11,7 @@ function init_vote_browse_content(){
//主容器
//主容器
var
$vote_browse_content
=
$
(
'#vote_browse_content'
);
var
$vote_browse_content
=
$
(
'#vote_browse_content'
);
var
infos
=
result
.
rowSet
;
var
infos
=
result
.
rowSet
;
console
.
log
(
infos
);
for
(
var
j
=
0
;
j
<
infos
.
length
;
j
++
){
for
(
var
j
=
0
;
j
<
infos
.
length
;
j
++
){
var
options
=
[];
var
options
=
[];
//已投票的主题
//已投票的主题
...
@@ -19,7 +19,7 @@ function init_vote_browse_content(){
...
@@ -19,7 +19,7 @@ function init_vote_browse_content(){
options
=
voteModule
.
voteDataAction
.
listUserChecked
({
options
=
voteModule
.
voteDataAction
.
listUserChecked
({
FIELD_MANAGE_ID
:
infos
[
j
].
UUID
FIELD_MANAGE_ID
:
infos
[
j
].
UUID
}).
listusercheckeds
;
}).
listusercheckeds
;
console
.
log
(
options
);
}
}
//子容器
//子容器
var
$vote_browse_main
=
$
(
'<div></div>'
).
addClass
(
'vote_browse_main'
).
appendTo
(
$vote_browse_content
);
var
$vote_browse_main
=
$
(
'<div></div>'
).
addClass
(
'vote_browse_main'
).
appendTo
(
$vote_browse_content
);
...
...
WebContent/jfcas04_mobile/js/vote_details.js
View file @
bd72156a
...
@@ -11,17 +11,17 @@ function init_vote_details_content(){
...
@@ -11,17 +11,17 @@ function init_vote_details_content(){
var
results
=
voteModule
.
voteDataAction
.
listAll
({
var
results
=
voteModule
.
voteDataAction
.
listAll
({
FIELD_UUID
:
$
.
getUrlParam
(
'voteId'
)
FIELD_UUID
:
$
.
getUrlParam
(
'voteId'
)
}).
rowSet
;
}).
rowSet
;
console
.
log
(
results
);
//主题选项
//主题选项
var
v_jquery
=
{};
var
v_jquery
=
{};
v_jquery
.
FIELD_MANAGE_ID
=
$
.
getUrlParam
(
'voteId'
);
v_jquery
.
FIELD_MANAGE_ID
=
$
.
getUrlParam
(
'voteId'
);
var
infos
=
voteModule
.
voteDataAction
.
listItem
(
v_jquery
).
listItems
;
var
infos
=
voteModule
.
voteDataAction
.
listItem
(
v_jquery
).
listItems
;
console
.
log
(
infos
);
//获取已投票选项
//获取已投票选项
var
options
=
voteModule
.
voteDataAction
.
listUserChecked
({
var
options
=
voteModule
.
voteDataAction
.
listUserChecked
({
FIELD_MANAGE_ID
:
$
.
getUrlParam
(
'voteId'
)
FIELD_MANAGE_ID
:
$
.
getUrlParam
(
'voteId'
)
}).
listusercheckeds
;
}).
listusercheckeds
;
console
.
log
(
options
);
//主容器
//主容器
var
$vote_details_content
=
$
(
'#vote_details_content'
);
var
$vote_details_content
=
$
(
'#vote_details_content'
);
for
(
var
j
=
0
;
j
<
results
.
length
;
j
++
){
for
(
var
j
=
0
;
j
<
results
.
length
;
j
++
){
...
@@ -79,7 +79,7 @@ function init_vote_details_content(){
...
@@ -79,7 +79,7 @@ function init_vote_details_content(){
var
$span_3
=
$
(
'<span></span>'
).
text
(
infos
[
i
].
CONTENT
).
appendTo
(
$li_1
);
var
$span_3
=
$
(
'<span></span>'
).
text
(
infos
[
i
].
CONTENT
).
appendTo
(
$li_1
);
//判断主题是否已投票,已投票的选项不可再选
//判断主题是否已投票,已投票的选项不可再选
if
(
options
.
length
!=
0
){
if
(
options
.
length
!=
0
){
console
.
log
(
options
.
length
)
for
(
var
y
=
0
;
y
<
options
.
length
;
y
++
){
for
(
var
y
=
0
;
y
<
options
.
length
;
y
++
){
if
(
infos
[
i
].
UUID
==
options
[
y
].
ITEM_ID
){
if
(
infos
[
i
].
UUID
==
options
[
y
].
ITEM_ID
){
$input_1
.
prop
(
"checked"
,
"checked"
);
$input_1
.
prop
(
"checked"
,
"checked"
);
...
@@ -141,7 +141,7 @@ function save(handler){
...
@@ -141,7 +141,7 @@ function save(handler){
return
;
return
;
}
}
var
result
=
voteModule
.
voteActAction
.
insertUserVote
(
v_jquery
);
var
result
=
voteModule
.
voteActAction
.
insertUserVote
(
v_jquery
);
console
.
log
(
v_jquery
);
if
(
result
.
VALUE
==
'保存成功'
){
if
(
result
.
VALUE
==
'保存成功'
){
//弹出框
//弹出框
swal
({
swal
({
...
...
WebContent/jfcas04_mobile/js/vote_major.js
View file @
bd72156a
...
@@ -7,7 +7,6 @@ function init_vote_major_content(){
...
@@ -7,7 +7,6 @@ function init_vote_major_content(){
var
result
=
voteModule
.
voteDataAction
.
list
({
var
result
=
voteModule
.
voteDataAction
.
list
({
FIELD_UUID
:
$
.
getUrlParam
(
'voteId'
)
FIELD_UUID
:
$
.
getUrlParam
(
'voteId'
)
}).
rowSet
;
}).
rowSet
;
console
.
log
(
result
);
var
$vote_major_content
=
$
(
'#vote_major_content'
);
var
$vote_major_content
=
$
(
'#vote_major_content'
);
var
$ul_1
=
$
(
'<ul></ul>'
).
appendTo
(
$vote_major_content
);
var
$ul_1
=
$
(
'<ul></ul>'
).
appendTo
(
$vote_major_content
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment