$(function(){ gowjdc(); }); function goreturn() { var url="../survey/wdwj_execute.do"; location.href=url; } function gowjdc() { $('#dcbegin').empty(); $('#dccore').empty(); $('#dcend').empty(); $('#SubjectId').val(YihuUtil.queryString('subjectid')); var params={}; params.SubjectId=$('#SubjectId').val(); $.post('/WbjUI/wbj2/business/web/cjwj_querySubjectById.do', params, function (result) { if(result.Code==10000) { $('#dcbegin').append(result.BeginIntro); $('#dcend').append(result.EndingIntro); if(result.SubjectTitle.length<15) { $('#subjecttitle').html(result.SubjectTitle); }else { $('#subjecttitle').html(result.SubjectTitle.substring(0,15)+'...'); } var str=''; $.each(result.Result,function(i,item) { i+=1; if(item.QuestType<3) { str+='
Q'+i+''+item.Question+'
'; str+='
'; } if(item.QuestType==3) { str+='
Q'+i+''+item.Question+'
'; str+='
'; } if(item.QuestType==4) { str+='
Q'+i+''+item.Question+'
'; str+='
'; $.each(item.ChildrenMatrixQuestion,function(i,martquesion) { str+=''; }); str+='
'+martquesion.Question+''; $.each(martquesion.MatrixQuestItems,function(i,martitem) { str+=''; }); str+='
'; } if(item.QuestType==5) { str+='
Q'+i+''+item.Question+'
'; str+='
'; $.each(item.ChildrenMatrixQuestion,function(i,martquesion) { str+=''; }); str+='
'+martquesion.Question+''; $.each(martquesion.MatrixQuestItems,function(i,martitem) { str+=''; }); str+='
'; } }); $('#dcore').append(str); }else { YihuUtil.dialog({ id: 'testID', content: result.Message, lock: true, button: [ { name: '确定', callback: function () { return true; }, focus: true } ] }); } }, "json"); } function alertMessage(msg,action){ YihuUtil.dialog({ title:"提示", content: msg, button : [{ name : '确定', callback : action }] }); } function closepop(id){ document.getElementById(id).style.display="none" } /*显示弹窗*/ function showpop(id){ document.getElementById(id).style.display="block" } function getSession(){ var session = YihuUtil.getSession(); return session; }