Commit bd72156a by 郎靓静

修改移动端投票

parent 192f79c9
......@@ -37,11 +37,11 @@ function init_vote_editor_content(){
var results = voteModule.voteDataAction.listAll({
FIELD_UUID : $.getUrlParam('voteId')
}).rowSet;
console.log(results);
var v_jquery = {};
v_jquery.FIELD_MANAGE_ID = $.getUrlParam('voteId');
var infos = voteModule.voteDataAction.listItem(v_jquery).listItems;
console.log(infos);
//查看每个选项的被选情况
......@@ -157,7 +157,7 @@ function savesend() {
v_jquery.FIELD_MIN_COUNT = $('#vote_select2').val();
v_jquery.FIELD_MAX_COUNT = $('#vote_select1').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==''){
$('.vote_editor_judge').css('display','block');
......@@ -207,7 +207,7 @@ function savesend() {
swal("Good!", "新增成功!", "success",function(){
alert()
});
console.log(result)
if(result.VALUE=='保存成功'){
swal({
title: "",
......@@ -227,7 +227,7 @@ function savesend() {
v_jquery.FIELD_UUID = results[0].UUID;
v_jquery.FIELD_OPETYPE = 'updata';
var result = voteModule.voteActAction.updateVote(v_jquery);
console.log(result)
//$.fancybox.open('编辑成功!');
if(result.VALUE=='修改成功'){
swal({
......
......@@ -11,7 +11,7 @@ function init_vote_browse_content(){
//主容器
var $vote_browse_content = $('#vote_browse_content');
var infos = result.rowSet;
console.log(infos);
for(var j=0;j < infos.length;j++){
var options = [];
//已投票的主题
......@@ -19,7 +19,7 @@ function init_vote_browse_content(){
options = voteModule.voteDataAction.listUserChecked({
FIELD_MANAGE_ID : infos[j].UUID
}).listusercheckeds;
console.log(options);
}
//子容器
var $vote_browse_main = $('<div></div>').addClass('vote_browse_main').appendTo($vote_browse_content);
......
......@@ -11,17 +11,17 @@ function init_vote_details_content(){
var results = voteModule.voteDataAction.listAll({
FIELD_UUID : $.getUrlParam('voteId')
}).rowSet;
console.log(results);
//主题选项
var v_jquery = {};
v_jquery.FIELD_MANAGE_ID = $.getUrlParam('voteId');
var infos = voteModule.voteDataAction.listItem(v_jquery).listItems;
console.log(infos);
//获取已投票选项
var options = voteModule.voteDataAction.listUserChecked({
FIELD_MANAGE_ID : $.getUrlParam('voteId')
}).listusercheckeds;
console.log(options);
//主容器
var $vote_details_content = $('#vote_details_content');
for(var j=0;j < results.length;j++){
......@@ -79,7 +79,7 @@ function init_vote_details_content(){
var $span_3 = $('<span></span>').text(infos[i].CONTENT).appendTo($li_1);
//判断主题是否已投票,已投票的选项不可再选
if(options.length!=0){
console.log(options.length)
for(var y=0;y<options.length;y++){
if(infos[i].UUID==options[y].ITEM_ID){
$input_1.prop("checked","checked");
......@@ -141,7 +141,7 @@ function save(handler){
return;
}
var result = voteModule.voteActAction.insertUserVote(v_jquery);
console.log(v_jquery);
if(result.VALUE == '保存成功'){
//弹出框
swal({
......
......@@ -7,7 +7,6 @@ function init_vote_major_content(){
var result = voteModule.voteDataAction.list({
FIELD_UUID : $.getUrlParam('voteId')
}).rowSet;
console.log(result);
var $vote_major_content = $('#vote_major_content');
var $ul_1 = $('<ul></ul>').appendTo($vote_major_content);
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