Commit bd72156a by 郎靓静

修改移动端投票

parent 192f79c9
...@@ -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({
......
...@@ -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);
......
...@@ -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({
......
...@@ -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++){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment