| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903 | 
							- $(function(){
 
- 	
 
- 	jQuery("#one").validationEngine();
 
- });
 
- var fl1=0;
 
- var fl2=0;
 
- var fl3=0;
 
- var fl4=0;
 
- var fl5=0;
 
- var fl6=0;
 
- var fl7=0;
 
- var fl8=0;
 
- var fl9=0;
 
- var fl10=0;
 
- var fl11=0;
 
- var fl12=0;
 
- var fl13=0;
 
- function getnewquestion()
 
- {
 
- 	
 
-    showpop('addQuestion');
 
-    juzhong();
 
-    
 
- }
 
- //居中
 
- function juzhong()
 
- {
 
- 	/*设置弹窗垂直居中*/
 
- 	popbox=$(".popbox");
 
- 	for(i=0;i<popbox.length;i++)
 
- 	{
 
- 		popbox.eq(i).css("margin-top",function(){
 
- 			return "-"+$(this).height()/2+"px";
 
- 		})
 
- 	}
 
- }
 
- function querySubjectsByOrgId()
 
- {
 
- 	
 
- 	var params={};
 
-     var session=getSession();
 
-   	params.OrgId=session.orgid;
 
- 	$.post('/WbjUI/wbj2/business/web/wtbj_querySubjectsByOrgId.do', params, function (result) {
 
- 		var str='<option value="">-请选择-</option>';
 
- 	   	 if(result.Code==10000)
 
- 		 {
 
- 	   		 $.each(result.Result,function(i,item)
 
- 	   		 {
 
- 	   			 str+='<option value='+item.SubjectId+'>'+item.SubjectTitle+'</option>';
 
- 	   		 })
 
- 	   		$('#myzoneselect').empty();
 
- 	   		$('#myzoneselect').append(str);
 
- 	    	 
 
- 		 }else
 
- 		 {
 
- 			 YihuUtil.dialog({
 
- 		  	 		id: 'testID',
 
- 		  	 	    content: result.Message,
 
- 		  	 	    lock: true,
 
- 		  	 	    button: [
 
- 		  	 	        {
 
- 		  	 	            name: '确定',
 
- 		  	 	            callback: function () {
 
- 		  	 	        	
 
- 		  	 	                return true;
 
- 		  	 	            },
 
- 		  	 	            focus: true
 
- 		  	 	        }
 
- 		  	 	    ]
 
- 		  	 		
 
- 		  	 	});
 
- 		 }
 
- 			 
 
- 	    }, "json");
 
- }
 
- //获取平台跟题库
 
- function  getquestroom()
 
- {
 
- 	querySubjectsByOrgId();
 
- 	myZone();
 
- 	queryPlatformQuestion();
 
- 	showpop('chooseQuestion');
 
- 	var $popTabMenu1=$("#popTabMenu1");
 
- 	var $popTabCon1=$("#popTabCon1");
 
- 	$popTabMenu1.find("li").removeClass("on").end().find("li:first-child").addClass("on");
 
- 	$popTabCon1.find(".pop-tab-con").hide().end().find(".pop-tab-con:first-child").show();
 
- 	$popTabMenu1.delegate("li","click",function(){
 
- 		var i=$(this).index();
 
- 		$popTabMenu1.find("li").removeClass("on");
 
- 		$(this).addClass("on");
 
- 		$popTabCon1.find(".pop-tab-con").hide().end().find(".pop-tab-con:eq("+i+")").show();
 
- 	})
 
-     juzhong();
 
- 	
 
- 	
 
- }
 
- //设置选项不同是的颜色变化
 
- function SetContentType(id)
 
- {
 
- 	$("#ContentTypetd").find("a").removeClass("c-007");
 
- 	$("#ContentTypetd").delegate("a","click",function(){
 
- 		$(this).addClass("c-007");
 
- 	})
 
- 	$("#QContentType").val(id);
 
- 	queryPlatformQuestion();
 
- }
 
- function SetObjType(id)
 
- {
 
- 	$("#ObjTypetd").find("a").removeClass("c-007");
 
- 	$("#ObjTypetd").delegate("a","click",function(){
 
- 		$(this).addClass("c-007");
 
- 	})
 
- 	$("#QObjType").val(id);
 
- 	queryPlatformQuestion();
 
- }
 
- function delQuest(id)
 
- {
 
- 	YihuUtil.dialog({
 
-  		id: 'testID',
 
-  	    width: '245px',
 
-  	    height: '109px',
 
-  	    content: '确认要删除?',
 
-  	    lock: true,
 
-  	    button: [
 
-  	        {
 
-  	            name: '确定',
 
-  	            callback: function () {
 
-  	       	var params={};
 
-  	     	params.QuestId=id;
 
-  	       $.post('/WbjUI/wbj2/business/web/wtbj_delQuest.do', params, function (result) {
 
-  	      	 if(result.Code==10000)
 
-  	      	 {
 
-  	      		 getCore();
 
-  	      	 }
 
-  	      	 else
 
-  	      	 {
 
-  	   			 YihuUtil.dialog({
 
-  	   		  	 		id: 'testID',
 
-  	   		  	 	    content: result.Message,
 
-  	   		  	 	    lock: true,
 
-  	   		  	 	    button: [
 
-  	   		  	 	        {
 
-  	   		  	 	            name: '确定',
 
-  	   		  	 	            callback: function () {
 
-  	   		  	 	        	
 
-  	   		  	 	                return true;
 
-  	   		  	 	            },
 
-  	   		  	 	            focus: true
 
-  	   		  	 	        }
 
-  	   		  	 	    ]
 
-  	   		  	 		
 
-  	   		  	 	});
 
-  	      	 }
 
-  	   	}, "json");	
 
-  	       		
 
-  	                return true;
 
-  	            },
 
-  	            focus: true
 
-  	        },
 
-  	       {
 
-  	            name: '取消'
 
-  	        }
 
-  	    ]
 
-  		
 
-  	});
 
- }
 
- function updateSubjectend(obj)
 
- {
 
- 	
 
-     if(uniteMessage($(obj).html(),200))
 
-     {
 
-     	return;
 
-     }
 
-   	var params={};
 
-   	var session=getSession();
 
-   	params.SubjectId=$('#onlySubjectId').val();
 
-   	params.EndingIntro=$(obj).html();
 
-     params.OperatorId=session.userId;
 
-     params.OperatorName=session.operatorname;
 
- 	$.post('/WbjUI/wbj2/business/web/wtbj_updateSubjectend.do', params, function (result) {
 
- 	   	 if(result.Code==10000)
 
- 		 {
 
- 	   		$('#end').append(result.EndingIntro);
 
- 	   		$(obj).removeClass('cont-editable').attr('contenteditable',false);
 
- 	    	 
 
- 		 }else
 
- 		 {
 
- 			 YihuUtil.dialog({
 
- 		  	 		id: 'testID',
 
- 		  	 	    content: result.Message,
 
- 		  	 	    lock: true,
 
- 		  	 	    button: [
 
- 		  	 	        {
 
- 		  	 	            name: '确定',
 
- 		  	 	            callback: function () {
 
- 		  	 	        	
 
- 		  	 	                return true;
 
- 		  	 	            },
 
- 		  	 	            focus: true
 
- 		  	 	        }
 
- 		  	 	    ]
 
- 		  	 		
 
- 		  	 	});
 
- 		 }
 
-     }, "json");	
 
- }
 
- function updateSubjectbegin(obj)
 
- {
 
-     if(uniteMessage($(obj).html(),200))
 
-     {
 
-     	return;
 
-     }
 
-   	var params={};
 
-   	var session=getSession();
 
-   	params.SubjectId=$('#onlySubjectId').val();
 
-   	params.BeginIntro=$(obj).html();
 
-     params.OperatorId=session.userId;
 
-     params.OperatorName=session.operatorname;
 
- 	$.post('/WbjUI/wbj2/business/web/wtbj_updateSubjectbegin.do', params, function (result) {
 
- 	   	 if(result.Code==10000)
 
- 		 {
 
- 	   		$('#begin').append(result.BeginIntro);
 
- 	   		$(obj).removeClass('cont-editable').attr('contenteditable',false);
 
- 	    	 
 
- 		 }else
 
- 		 {
 
- 			 YihuUtil.dialog({
 
- 		  	 		id: 'testID',
 
- 		  	 	    content: result.Message,
 
- 		  	 	    lock: true,
 
- 		  	 	    button: [
 
- 		  	 	        {
 
- 		  	 	            name: '确定',
 
- 		  	 	            callback: function () {
 
- 		  	 	        	
 
- 		  	 	                return true;
 
- 		  	 	            },
 
- 		  	 	            focus: true
 
- 		  	 	        }
 
- 		  	 	    ]
 
- 		  	 		
 
- 		  	 	});
 
- 		 }
 
-     }, "json");	
 
- }
 
- function updateQuest(obj,id)
 
- {
 
-     if(uniteMessage($(obj).html(),30))
 
-     {
 
-     	return;
 
-     }
 
-   	var params={};
 
-   	var session=getSession();
 
-   	params.QuestId=id;
 
-   	params.Question=$(obj).html();
 
-     params.OperatorId=session.userId;
 
-     params.OperatorName=session.operatorname;
 
- 	$(obj).removeClass('tit-editable').attr('contenteditable',false);
 
- 	$.post('/WbjUI/wbj2/business/web/wtbj_updateQuest.do', params, function (result) {
 
- 	   	 if(result.Code==10000)
 
- 		 {
 
- 	   		getCore();
 
- 	    	 
 
- 		 }else
 
- 		 {
 
- 			 YihuUtil.dialog({
 
- 		  	 		id: 'testID',
 
- 		  	 	    content: result.Message,
 
- 		  	 	    lock: true,
 
- 		  	 	    button: [
 
- 		  	 	        {
 
- 		  	 	            name: '确定',
 
- 		  	 	            callback: function () {
 
- 		  	 	        	
 
- 		  	 	                return true;
 
- 		  	 	            },
 
- 		  	 	            focus: true
 
- 		  	 	        }
 
- 		  	 	    ]
 
- 		  	 		
 
- 		  	 	});
 
- 		 }
 
-     }, "json");	
 
- }
 
- function upateItem(obj,id)
 
- {
 
-     if(uniteMessage($(obj).html(),30))
 
-     {
 
-     	return;
 
-     }
 
-   	var params={};
 
-   	var session=getSession();
 
-   	params.ItemId=id;
 
-   	params.ItemCont=$(obj).html();
 
-     params.OperatorId=session.userId;
 
-     params.OperatorName=session.operatorname;
 
- 	$(obj).removeClass('answer-editable').attr('contenteditable',false);
 
- 	$.post('/WbjUI/wbj2/business/web/wtbj_upateItem.do', params, function (result) {
 
- 	   	 if(result.Code==10000)
 
- 		 {
 
- 	   		getCore();
 
- 	    	 
 
- 		 }else
 
- 		 {
 
- 			 YihuUtil.dialog({
 
- 		  	 		id: 'testID',
 
- 		  	 	    content: result.Message,
 
- 		  	 	    lock: true,
 
- 		  	 	    button: [
 
- 		  	 	        {
 
- 		  	 	            name: '确定',
 
- 		  	 	            callback: function () {
 
- 		  	 	        	
 
- 		  	 	                return true;
 
- 		  	 	            },
 
- 		  	 	            focus: true
 
- 		  	 	        }
 
- 		  	 	    ]
 
- 		  	 		
 
- 		  	 	});
 
- 		 }
 
-     }, "json");
 
- }
 
- function getNewItem(id)
 
- {
 
-    $('#'+id).show();	
 
- }
 
- function newchilditem(id)
 
- {
 
-    $('#'+id).show();	
 
- }
 
- function addItem(obj,id)
 
- {
 
-     if(uniteMessage($(obj).parent().find("input").val(),30))
 
-     {
 
-     	return;
 
-     }
 
- 	var params={};
 
- 	var session=getSession();
 
- 	params.QuestId=id;
 
- 	params.ItemCont=$(obj).parent().find("input").val();
 
-     params.OperatorId=session.userId;
 
-     params.OperatorName=session.operatorname;
 
- 	$.post('/WbjUI/wbj2/business/web/wtbj_addItem.do', params, function (result) {
 
- 	   	 if(result.Code==10000)
 
- 		 {
 
- 	   		getCore();
 
- 	    	 
 
- 		 }else
 
- 		 {
 
- 			 YihuUtil.dialog({
 
- 		  	 		id: 'testID',
 
- 		  	 	    content: result.Message,
 
- 		  	 	    lock: true,
 
- 		  	 	    button: [
 
- 		  	 	        {
 
- 		  	 	            name: '确定',
 
- 		  	 	            callback: function () {
 
- 		  	 	        	
 
- 		  	 	                return true;
 
- 		  	 	            },
 
- 		  	 	            focus: true
 
- 		  	 	        }
 
- 		  	 	    ]
 
- 		  	 		
 
- 		  	 	});
 
- 		 }
 
-     }, "json");
 
- }
 
- function dellogical(obj,id)
 
- {
 
- 	if(id==null||id=="")
 
- 	{
 
- 		$(obj).parent().remove();
 
- 	}
 
- 	if(id!=null||id!="")
 
- 	{
 
- 		var params={};
 
- 		var session=getSession();
 
- 		params.ItemId=id;
 
- 	    params.OperatorId=session.userId;
 
- 	    params.OperatorName=session.operatorname;
 
- 		$.post('/WbjUI/wbj2/business/web/wtbj_delQuestionFlow.do', params, function (result) {
 
- 		   	 if(result.Code==10000)
 
- 			 {
 
- 		   		$(obj).parent().remove();
 
- 		    	 
 
- 			 }else
 
- 			 {
 
- 				 YihuUtil.dialog({
 
- 			  	 		id: 'testID',
 
- 			  	 	    content: result.Message,
 
- 			  	 	    lock: true,
 
- 			  	 	    button: [
 
- 			  	 	        {
 
- 			  	 	            name: '确定',
 
- 			  	 	            callback: function () {
 
- 			  	 	        	
 
- 			  	 	                return true;
 
- 			  	 	            },
 
- 			  	 	            focus: true
 
- 			  	 	        }
 
- 			  	 	    ]
 
- 			  	 		
 
- 			  	 	});
 
- 			 }
 
- 	    }, "json");
 
- 	}
 
- }
 
- function getlogicalSetting(obj,Questid)
 
- {   
 
- 	
 
- 	$('#logicalQuestid').val(Questid);
 
- 	// 清除缓存 
 
- 	$("div").removeData("keyitem");
 
- 	$("div").removeData("keyvalue");
 
- 	$('#jumpdiv').empty();
 
-     $('#jumpbutton').empty();
 
-     getquestItemforlogical(Questid);
 
-     getnextQuestforlogical(obj);
 
- 	showpop('logicalSetting');
 
- 	//alert($(obj).parent().parent().parent().find("span:first").html());
 
- 	//alert($(obj).parent().parent().parent().attr("sortquestid"));
 
- 	var Qparams={};
 
- 	
 
- 	
 
- 	Qparams.QuestId=Questid;
 
- 	str='';
 
- 	$.ajax({url:'/WbjUI/wbj2/business/web/wtbj_queryQuestionFlow.do',async:false,type:"post", data: Qparams, success:function (result) {
 
- 		 if(result.Code==10000)
 
- 		 {
 
- 				$.each(result.Result,function(i,item)
 
- 				{
 
- 				   str+='<div  class="mt25"><label style="width:45px;">选中:</label>';
 
- 				   str+='<select onchange="nextQuest()" class="pop-sel" style="width:140px">';
 
- 				   var p={};
 
- 				   p.QuestId=Questid;
 
- 				 
 
- 				  $.ajax({url:'/WbjUI/wbj2/business/web/wtbj_queryQuestionItem.do',async:false,type:"post", data: Qparams, success:function (result) {
 
- 					   if(result.Code==10000)
 
- 					   {
 
- 						   $.each(result.Result,function(k,it)
 
- 						   {
 
- 							  
 
- 							   //跳转选项
 
- 							   if(item.ItemId==it.ItemId)
 
- 							   {
 
- 								   str+='<option selected value='+it.ItemId+'>'+it.ItemCont+'</option>';
 
- 							   }else
 
- 							   {
 
- 								   str+='<option value='+it.ItemId+'>'+it.ItemCont+'</option>';
 
- 							   }
 
- 							 
 
- 						   });
 
- 					   }
 
- 					   else
 
- 					   {
 
- 							 YihuUtil.dialog({
 
- 						  	 		id: 'testID',
 
- 						  	 	    content: result.Message,
 
- 						  	 	    lock: true,
 
- 						  	 	    button: [
 
- 						  	 	        {
 
- 						  	 	            name: '确定',
 
- 						  	 	            callback: function () {
 
- 						  	 	        	
 
- 						  	 	                return true;
 
- 						  	 	            },
 
- 						  	 	            focus: true
 
- 						  	 	        }
 
- 						  	 	    ]
 
- 						  	 		
 
- 						  	 	});
 
- 					   }
 
- 					}, dataType:"json"});	
 
- 				   str+='</select>';
 
- 				   str+='<label style="width:60px;">跳转至:</label>';
 
- 				   str+='<select class="pop-sel" style="width:140px">';   
 
- 				   var divs=$(obj).parent().parent().parent().parent().children('div'),
 
- 			       len=$(obj).parent().parent().parent().parent().children('div').length;
 
- 			       objdiv=$(obj).parent().parent().parent(),
 
- 			       objindex=divs.index(objdiv);
 
- 			       for(var m=0;m<len;m++)
 
- 			       {
 
- 			    	   if(m>objindex)
 
- 			    	   {
 
- 			    		  
 
- 			    		   //跳转问题
 
- 			    		   if(item.NextQuestId==divs.eq(m).attr("sortquestid"))
 
- 			    		   {
 
- 			    			   str+='<option selected value='+divs.eq(m).attr("sortquestid")+'>'+divs.eq(m).find("span:first").html()+'</option>';
 
- 			    		   }
 
- 			    		   else
 
- 			    		   {
 
- 			    			   str+='<option value='+divs.eq(m).attr("sortquestid")+'>'+divs.eq(m).find("span:first").html()+'</option>';
 
- 			    		   }
 
- 			    		   
 
- 			    	   }
 
- 			       }
 
- 			       if(item.NextQuestId=="10")
 
- 			       {
 
- 			    	   str+='<option selected value="10">结束(计入结果)</option>';
 
- 			       }else
 
- 			       {
 
- 			    	   str+='<option value="10">结束(计入结果)</option>';
 
- 			       }
 
- 			       if(item.NextQuestId=="11")
 
- 			       {
 
- 			    	   str+=' <option selected value="11">结束(不计入结果)</option>';
 
- 			       }else
 
- 			       {
 
- 			    	   str+=' <option value="11">结束(不计入结果)</option>';  
 
- 			       }
 
- 			       
 
- 			      
 
- 			   
 
- 			   
 
- 			   str+='</select><a class="ml10" onclick=dellogical(this,"'+item.ItemId+'") href="javascript:;"><img  src="../../common/themes/default/images/nav-gb.png" /></a></div>';
 
- 					
 
- 				
 
- 				
 
- 				   
 
- 				  
 
- 				})
 
- 			$('#jumpdiv').append(str);				
 
- 			$('#jumpbutton').append('<div class="mt25"><a href="javascript:;" onclick=getJump() class="c-007">添加跳转条件</a></div>');
 
- 			juzhong();
 
- 				
 
- 		 }else
 
- 		 {
 
- 			 YihuUtil.dialog({
 
- 		  	 		id: 'testID',
 
- 		  	 	    content: result.Message,
 
- 		  	 	    lock: true,
 
- 		  	 	    button: [
 
- 		  	 	        {
 
- 		  	 	            name: '确定',
 
- 		  	 	            callback: function () {
 
- 		  	 	        	
 
- 		  	 	                return true;
 
- 		  	 	            },
 
- 		  	 	            focus: true
 
- 		  	 	        }
 
- 		  	 	    ]
 
- 		  	 		
 
- 		  	 	});
 
- 		 }
 
- 		
 
- 	}, dataType:"json"});		
 
- 	
 
- }
 
- //获取逻辑跳转的前面选项
 
- function getquestItemforlogical(Questid)
 
- {   
 
- 	var itemQ='';
 
- 	var p={};
 
- 	   p.QuestId=Questid;
 
- 	   $.post('/WbjUI/wbj2/business/web/wtbj_queryQuestionItem.do', p, function (result) {
 
- 		   if(result.Code==10000)
 
- 		   {
 
- 			   $.each(result.Result,function(i,it)
 
- 			   {
 
- 				   itemQ+='<option value='+it.ItemId+'>'+it.ItemCont+'</option>';
 
- 			   });
 
- 			  // alert(itemQ);
 
- 			   $("div").data("keyitem",itemQ);
 
- 			   var a='aa';
 
- 		   }else
 
- 		   {
 
- 				 YihuUtil.dialog({
 
- 			  	 		id: 'testID',
 
- 			  	 	    content: result.Message,
 
- 			  	 	    lock: true,
 
- 			  	 	    button: [
 
- 			  	 	        {
 
- 			  	 	            name: '确定',
 
- 			  	 	            callback: function () {
 
- 			  	 	        	
 
- 			  	 	                return true;
 
- 			  	 	            },
 
- 			  	 	            focus: true
 
- 			  	 	        }
 
- 			  	 	    ]
 
- 			  	 		
 
- 			  	 	}); 
 
- 		   }
 
- 	   }, "json");	
 
- 		   
 
- }
 
- //获取逻辑跳转的后面选项
 
- function getnextQuestforlogical(obj)
 
- {   
 
- 	   var valueQ='';
 
- 	   var divs=$(obj).parent().parent().parent().parent().children('div'),
 
-        len=$(obj).parent().parent().parent().parent().children('div').length;
 
-        objdiv=$(obj).parent().parent().parent(),
 
-        objindex=divs.index(objdiv);
 
-        for(var m=0;m<len;m++)
 
-        {
 
-     	   if(m>objindex)
 
-     	   {
 
-     		   valueQ+='<option value='+divs.eq(m).attr("sortquestid")+'>'+divs.eq(m).find("span:first").html()+'</option>';
 
-     		   
 
-     	   }
 
-        }
 
-        valueQ+='<option value="10">结束(计入结果)</option><option value="11">结束(不计入结果)</option>';
 
-       // alert(valueQ);
 
-        $("div").data("keyvalue",valueQ);
 
- 		   
 
- }
 
- //显示逻辑跳转页面
 
- function getJump()
 
- {
 
- 	if($("div").data("keyitem")==null||$("div").data("keyitem")==undefined)
 
- 	{
 
- 		
 
- 	}
 
- 	str='';
 
- 	str+='<div class=""><label style="width:45px;">选中:</label>';
 
- 	str+='<select class="pop-sel" style="width:140px">';
 
- 	str+=$("div").data("keyitem");
 
- 	str+='</select>';
 
- 	str+='<label style="width:60px;">跳转至:</label>';
 
- 	str+='<select class="pop-sel" style="width:140px">';
 
- 	str+=$("div").data("keyvalue")
 
- 	str+='</select><a class="ml10" onclick=dellogical(this,"") href="javascript:;"><img  src="../../common/themes/default/images/nav-gb.png" /></a></div>';
 
- 	$("#jumpdiv").append(str);
 
- 	
 
- }
 
- //添加逻辑跳转
 
- function addJump()
 
- {
 
- 	var divs=$("#jumpdiv").children('div');	
 
- 	var len=$("#jumpdiv").children('div').length;
 
-     var ids = [];
 
-     var tag=false;
 
- 	for(var i=0;i<len;i++)
 
- 	{
 
- 		ids.push(divs.eq(i).find("select:first").val());
 
- 	}
 
- 	var str=ids.join(",")+",";
 
- 	for(var i = 0; i < ids.length; i++)
 
- {
 
-    if(str.replace(ids[i] + ",", "").indexOf(ids[i] +",") > -1)
 
-     {
 
- 	   tag=true;
 
-        break;
 
- 	    
 
-     }
 
- }
 
-    if(tag)
 
-    {  
 
- 	   var msg="选项有重复!!"
 
- 	   Commonjs.alert(msg);
 
- 	   return;
 
-    }
 
- 	for(var i=0;i<len;i++)
 
- 	{
 
- 		var delparams={};
 
- 		delparams.ItemId=divs.eq(i).find("select:first").val();
 
- 		
 
- 			$.ajax({url:'/WbjUI/wbj2/business/web/wtbj_delQuestionFlow.do',async:false,type:"post", data: delparams, success:function (result) {
 
- 			if(result.Code==10000)
 
- 			{
 
- 				
 
- 			}
 
- 			else
 
- 			   
 
- 			{
 
- 				 YihuUtil.dialog({
 
- 			  	 		id: 'testID',
 
- 			  	 	    content: result.Message,
 
- 			  	 	    lock: true,
 
- 			  	 	    button: [
 
- 			  	 	        {
 
- 			  	 	            name: '确定',
 
- 			  	 	            callback: function () {
 
- 			  	 	        	
 
- 			  	 	                return true;
 
- 			  	 	            },
 
- 			  	 	            focus: true
 
- 			  	 	        }
 
- 			  	 	    ]
 
- 			  	 		
 
- 			  	 	}); 
 
- 		   }
 
- 			
 
- 			
 
- 	 }, dataType:"json"});	
 
- 	}
 
- 		for(var i=0;i<len;i++)
 
- 	{
 
- 		//alert(divs.eq(i).find("select:eq(0)").val());
 
- 		//alert(divs.eq(i).find("select:eq(1)").val());
 
- 		   var p={};
 
- 		   var session=getSession();
 
- 		   p.ItemId=divs.eq(i).find("select:eq(0)").val();
 
- 		   p.NextQuestId=divs.eq(i).find("select:eq(1)").val();
 
- 		   p.OperatorId=session.userId;
 
- 		   p.OperatorName=session.operatorname;
 
- 		   $.ajax({url:'/WbjUI/wbj2/business/web/wtbj_addQuestionFlow.do',async:false,type:"post", data: p, success:function (result) {
 
- 			   if(result.Code==10000)
 
- 			   {
 
- 				  
 
- 			   }else
 
- 			   {
 
- 					 YihuUtil.dialog({
 
- 				  	 		id: 'testID',
 
- 				  	 	    content: result.Message,
 
- 				  	 	    lock: true,
 
- 				  	 	    button: [
 
- 				  	 	        {
 
- 				  	 	            name: '确定',
 
- 				  	 	            callback: function () {
 
- 				  	 	        	
 
- 				  	 	                return true;
 
- 				  	 	            },
 
- 				  	 	            focus: true
 
- 				  	 	        }
 
- 				  	 	    ]
 
- 				  	 		
 
- 				  	 	}); 
 
- 			   }
 
- 		   },dataType:"json"});	
 
- 	}
 
- 		 getCore();
 
- 		 closepop('logicalSetting');
 
- 		
 
- }
 
- //增加一行
 
- function addMatrQuest(obj,id)
 
- {
 
-     if(uniteMessage($(obj).parent().find("input").val(),30))
 
-     {
 
-     	return;
 
-     }
 
- 	var Qparams={};
 
- 	Qparams.QuestId=id;
 
- 	$.post('/WbjUI/wbj2/business/web/wtbj_queryQuestion.do', Qparams, function (result) {
 
- 		if(result.Code==10000)
 
- 		{
 
- 			var params={};
 
- 			var session=getSession();
 
- 			params.SubjectId=result.SubjectId;
 
- 			params.ObjType=result.ObjType;
 
- 			params.ContentType=result.ContentType;
 
- 			params.QuestType=result.QuestType;
 
- 			params.MatrixQuestId=id;
 
- 			params.Question=$(obj).parent().find("input").val();
 
- 		    params.OperatorId=session.userId;
 
- 		    params.OperatorName=session.operatorname;
 
- 			var a= $(obj).parent().parent().find('table').first().find('tbody').find('tr').first().find('td').length;
 
- 		  	var b=$(obj).parent().parent().find('table').first().find('tbody').find('tr').first().find('td');
 
- 		    $.post('/WbjUI/wbj2/business/web/wtbj_addQuestion.do', params, function (result) {
 
- 			   	 if(result.Code==10000)
 
- 				 {
 
- 			   		for(var i=1;i<a;i++)
 
- 			   		{
 
- 			   			var par={};
 
- 						par.QuestId=result.QuestId;
 
- 						par.ItemCont=b.eq(i).find("span").html();
 
- 						par.OperatorId=session.userId;
 
- 						par.OperatorName=session.operatorname;
 
- 						 $.post('/WbjUI/wbj2/business/web/wtbj_addItem.do', par, function (result) {
 
- 							 if(result.Code==10000)
 
- 							 {
 
- 								 
 
- 							 }
 
- 							 else
 
- 							 {
 
- 								 YihuUtil.dialog({
 
- 							  	 		id: 'testID',
 
- 							  	 	    content: result.Message,
 
- 							  	 	    lock: true,
 
- 							  	 	    button: [
 
- 							  	 	        {
 
- 							  	 	            name: '确定',
 
- 							  	 	            callback: function () {
 
- 							  	 	        	
 
- 							  	 	                return true;
 
- 							  	 	            },
 
- 							  	 	            focus: true
 
- 							  	 	        }
 
- 							  	 	    ]
 
- 							  	 		
 
- 							  	 	});
 
- 							 }
 
- 						 }, "json");
 
- 			   		}
 
- 			   		
 
- 			   		getCore();
 
- 			    	 
 
- 				 }else
 
- 				 {
 
- 					 YihuUtil.dialog({
 
- 				  	 		id: 'testID',
 
- 				  	 	    content: result.Message,
 
- 				  	 	    lock: true,
 
- 				  	 	    button: [
 
- 				  	 	        {
 
- 				  	 	            name: '确定',
 
- 				  	 	            callback: function () {
 
- 				  	 	        	
 
- 				  	 	                return true;
 
- 				  	 	            },
 
- 				  	 	            focus: true
 
- 				  	 	        }
 
- 				  	 	    ]
 
- 				  	 		
 
- 				  	 	});
 
- 				 }
 
- 		    }, "json");  
 
- 		}else
 
- 		{
 
- 			 YihuUtil.dialog({
 
- 		  	 		id: 'testID',
 
- 		  	 	    content: result.Message,
 
- 		  	 	    lock: true,
 
- 		  	 	    button: [
 
- 		  	 	        {
 
- 		  	 	            name: '确定',
 
- 		  	 	            callback: function () {
 
- 		  	 	        	
 
- 		  	 	                return true;
 
- 		  	 	            },
 
- 		  	 	            focus: true
 
- 		  	 	        }
 
- 		  	 	    ]
 
- 		  	 		
 
- 		  	 	});
 
- 		}
 
- 	}, "json");	
 
- 	
 
-     
 
-     
 
- }
 
-   //增加一列
 
-   function addMatrItem(obj)
 
- {
 
-     if(uniteMessage($(obj).parent().find("input").val(),30))
 
-     {
 
-     	return;
 
-     }
 
-     var t= $(obj).parent().parent().find('table').first().find('tr');
 
-     var a= $(obj).parent().parent().find('table').first().find('tr').length;
 
-     for(var i=1;i<a;i++)
 
-     {
 
-     	var params={};
 
-     	var session=getSession();
 
-     	params.QuestId=t.eq(i).find('td:first').find("a[quesid]").attr("quesid");
 
-     	params.ItemCont=$(obj).parent().find("input").val();
 
-         params.OperatorId=session.userId;
 
-         params.OperatorName=session.operatorname;
 
-        
 
-        $.ajax({url:'/WbjUI/wbj2/business/web/wtbj_addItem.do',async:false,type:"post", data: params, success:function (result) {
 
-         	 if(result.Code==10000)
 
-         	 {
 
-         		 
 
-         	 }
 
-         	 else
 
-         	 {
 
-     			 YihuUtil.dialog({
 
-  		  	 		id: 'testID',
 
-  		  	 	    content: result.Message,
 
-  		  	 	    lock: true,
 
-  		  	 	    button: [
 
-  		  	 	        {
 
-  		  	 	            name: '确定',
 
-  		  	 	            callback: function () {
 
-  		  	 	        	
 
-  		  	 	                return true;
 
-  		  	 	            },
 
-  		  	 	            focus: true
 
-  		  	 	        }
 
-  		  	 	    ]
 
-  		  	 		
 
-  		  	 	});
 
-         	 }
 
-     	}, dataType:"json"});	
 
-         	
 
-     }
 
-     getCore();
 
- }
 
-   //删除一列
 
- function delcol(v)
 
- {
 
- 		var trlen=$(v).parent().parent().parent().find('tr').length;
 
- 		var trlist=$(v).parent().parent().parent().find('tr');
 
- 	   	var thistd=$(v).parent();
 
- 	    var tdlist=$(v).parent().parent().find('td');
 
- 	    _tdindex=tdlist.index(thistd);
 
- 	    for (var i = 0; i < trlen; i++) 
 
- 	    {
 
- 		    if(i>0)
 
- 		    {
 
- 		     var itemid=trlist.eq(i).find("td").eq(_tdindex).find("input[itemid]").attr("itemid");
 
- 		   
 
- 	        // trlist.eq(i).find("td").eq(_tdindex).remove();
 
- 			 var params={};
 
- 			 	
 
- 		 	 params.ItemId=itemid;
 
- 		     $.post('/WbjUI/wbj2/business/web/wtbj_deleteQuestionItem.do', params, function (result) {
 
- 		    	 if(result.Code==10000)
 
- 		    	 {
 
- 		    		
 
- 		    	 }
 
- 		    	 else
 
- 		    	 {
 
- 					 YihuUtil.dialog({
 
- 				  	 		id: 'testID',
 
- 				  	 	    content: result.Message,
 
- 				  	 	    lock: true,
 
- 				  	 	    button: [
 
- 				  	 	        {
 
- 				  	 	            name: '确定',
 
- 				  	 	            callback: function () {
 
- 				  	 	        	
 
- 				  	 	                return true;
 
- 				  	 	            },
 
- 				  	 	            focus: true
 
- 				  	 	        }
 
- 	
 
- 				  	 	    ]
 
- 				  	 		
 
- 				  	 	});
 
- 		    	 }
 
- 			}, "json");	
 
- 		     
 
- 	 	    }  
 
- 		    
 
- 		  
 
- 		 
 
- 		  
 
- 	 }
 
- 	 getCore();
 
- 	  
 
- }
 
- //删除一行
 
-   function delrow(v)
 
-  {
 
- 	  var trlen=$(v).parent().parent().parent().find('tr').length;
 
- 	  if(trlen<=2)
 
- 	  {
 
- 		  var msg="至少得有一项";
 
- 		  Commonjs.alert(msg);
 
- 		  return;
 
- 	  }
 
- 	 var quesid=$(v).parent().find("a[quesid]").attr("quesid");
 
- //	 alert(quesid);
 
- //	 $(v).parent().parent().remove();
 
- 	 var params={};
 
-  	
 
-  	 params.QuestId=quesid;
 
-      $.post('/WbjUI/wbj2/business/web/wtbj_deleteQuestion.do', params, function (result) {
 
-     	 if(result.Code==10000)
 
-     	 {
 
-     		 getCore();
 
-     	 }
 
-     	 else
 
-     	 {
 
- 			 YihuUtil.dialog({
 
- 		  	 		id: 'testID',
 
- 		  	 	    content: result.Message,
 
- 		  	 	    lock: true,
 
- 		  	 	    button: [
 
- 		  	 	        {
 
- 		  	 	            name: '确定',
 
- 		  	 	            callback: function () {
 
- 		  	 	        	
 
- 		  	 	                return true;
 
- 		  	 	            },
 
- 		  	 	            focus: true
 
- 		  	 	        }
 
- 		  	 	    ]
 
- 		  	 		
 
- 		  	 	});
 
-     	 }
 
- 	}, "json");	
 
- }
 
- function delMatrixQuest(id)
 
- {
 
- 	YihuUtil.dialog({
 
-  		id: 'testID',
 
-  	    width: '245px',
 
-  	    height: '109px',
 
-  	    content: '确认要删除?',
 
-  	    lock: true,
 
-  	    button: [
 
-  	        {
 
-  	            name: '确定',
 
-  	            callback: function () {
 
-  	       	var params={};
 
-  	     	params.QuestId=id;
 
-  	       $.post('/WbjUI/wbj2/business/web/wtbj_matdeleteQuestion.do', params, function (result) {
 
-  	      	 if(result.Code==10000)
 
-  	      	 {
 
-  	      		 getCore();
 
-  	      	 }
 
-  	      	 else
 
-  	      	 {
 
-  	   			 YihuUtil.dialog({
 
-  	   		  	 		id: 'testID',
 
-  	   		  	 	    content: result.Message,
 
-  	   		  	 	    lock: true,
 
-  	   		  	 	    button: [
 
-  	   		  	 	        {
 
-  	   		  	 	            name: '确定',
 
-  	   		  	 	            callback: function () {
 
-  	   		  	 	        	
 
-  	   		  	 	                return true;
 
-  	   		  	 	            },
 
-  	   		  	 	            focus: true
 
-  	   		  	 	        }
 
-  	   		  	 	    ]
 
-  	   		  	 		
 
-  	   		  	 	});
 
-  	      	 }
 
-  	   	}, "json");	
 
-  	       		
 
-  	                return true;
 
-  	            },
 
-  	            focus: true
 
-  	        },
 
-  	       {
 
-  	            name: '取消'
 
-  	        }
 
-  	    ]
 
-  		
 
-  	});
 
- }
 
- function Qup(obj,id)
 
- {
 
- 	var _divs=$(obj).parent().parent().parent().parent().children("div"),
 
- 		_div=$(obj).parent().parent().parent(),
 
- 		_divindex = _divs.index(_div);
 
- 	if(_divindex>0)
 
- 	{
 
- 		    var session=getSession();
 
- 			var params={};
 
- 			params.OperatorName=session.operatorname;
 
- 			params.OperatorId=session.userId;
 
- 		  	params.QuestId1=id;
 
- 		  	params.QuestId2= _divs.eq(_divindex-1).attr("sortquestid");
 
- 		    $.post('/WbjUI/wbj2/business/web/wtbj_exchangeQuestionSort.do', params, function (result) {
 
- 		   	 if(result.Code==10000)
 
- 		   	 {
 
- 		   		 getCore();
 
- 		   	 }
 
- 		   	 else
 
- 		   	 {
 
- 					 YihuUtil.dialog({
 
- 				  	 		id: 'testID',
 
- 				  	 	    content: result.Message,
 
- 				  	 	    lock: true,
 
- 				  	 	    button: [
 
- 				  	 	        {
 
- 				  	 	            name: '确定',
 
- 				  	 	            callback: function () {
 
- 				  	 	        	
 
- 				  	 	                return true;
 
- 				  	 	            },
 
- 				  	 	            focus: true
 
- 				  	 	        }
 
- 				  	 	    ]
 
- 				  	 		
 
- 				  	 	});
 
- 		   	 }
 
- 			}, "json");	
 
- 	}
 
- 		
 
- 	
 
- }
 
- function Qdown(obj,id)
 
- {
 
- 	var _divs=$(obj).parent().parent().parent().parent().children("div"),
 
- 	_div=$(obj).parent().parent().parent(),
 
- 	_divindex = _divs.index(_div);
 
- 		if(_divindex<_divs.length-1)
 
- 		{
 
- 	    	var session=getSession();
 
- 			var params={};
 
- 			params.OperatorName=session.operatorname;
 
- 			params.OperatorId=session.userId;
 
- 			params.QuestId1=id;
 
- 		  	params.QuestId2= _divs.eq(_divindex+1).attr("sortquestid");
 
- 		    $.post('/WbjUI/wbj2/business/web/wtbj_exchangeQuestionSort.do', params, function (result) {
 
- 		   	 if(result.Code==10000)
 
- 		   	 {
 
- 		   		 getCore();
 
- 		   	 }
 
- 		   	 else
 
- 		   	 {
 
- 					 YihuUtil.dialog({
 
- 				  	 		id: 'testID',
 
- 				  	 	    content: result.Message,
 
- 				  	 	    lock: true,
 
- 				  	 	    button: [
 
- 				  	 	        {
 
- 				  	 	            name: '确定',
 
- 				  	 	            callback: function () {
 
- 				  	 	        	
 
- 				  	 	                return true;
 
- 				  	 	            },
 
- 				  	 	            focus: true
 
- 				  	 	        }
 
- 				  	 	    ]
 
- 				  	 		
 
- 				  	 	});
 
- 		   	 }
 
- 			}, "json");	
 
- 		}
 
- }
 
- function delItem(id)
 
- {
 
- 	var params={};
 
-   	params.ItemId=id;
 
-     $.post('/WbjUI/wbj2/business/web/wtbj_deleteQuestionItem.do', params, function (result) {
 
-    	 if(result.Code==10000)
 
-    	 {
 
-    		 getCore();
 
-    	 }
 
-    	 else
 
-    	 {
 
- 			 YihuUtil.dialog({
 
- 		  	 		id: 'testID',
 
- 		  	 	    content: result.Message,
 
- 		  	 	    lock: true,
 
- 		  	 	    button: [
 
- 		  	 	        {
 
- 		  	 	            name: '确定',
 
- 		  	 	            callback: function () {
 
- 		  	 	        	
 
- 		  	 	                return true;
 
- 		  	 	            },
 
- 		  	 	            focus: true
 
- 		  	 	        }
 
- 		  	 	    ]
 
- 		  	 		
 
- 		  	 	});
 
-    	 }
 
- 	}, "json");	
 
- }
 
- function hiddenItem(obj,id)
 
- {   
 
- 	$(obj).parent().find("input:first").val('');
 
- 	closepop(id);
 
- }
 
- function getCore()
 
- {      
 
-      fl1=0;
 
- 	 fl2=0;
 
- 	 fl3=0;
 
- 	 fl4=0;
 
- 	 fl5=0;
 
- 	 fl6=0;
 
- 	 fl7=0;
 
- 	 fl8=0;
 
- 	 fl9=0;
 
- 	 fl10=0;
 
- 	 fl11=0;
 
- 	 fl12=0;
 
- 	 fl13=0;
 
- 	 $('#zhibiaoul').empty();
 
- 	$('#core').empty();
 
-     $('#begin').empty();
 
-     $('#end').empty();
 
-   	var params={};
 
-   	params.SubjectId=$('#onlySubjectId').val();
 
-   	$.post('/WbjUI/wbj2/business/web/wtbj_querySubjectById.do', params, function (result) {
 
-   		if(result.Code==10000)
 
- 		{
 
- 				$('#begin').append(result.BeginIntro);
 
-   				$('#end').append(result.EndingIntro);
 
-   				if(result.SubjectTitle.length<15)
 
-   				{
 
-   	  				$('#twosubjecttitle').html(result.SubjectTitle);
 
-   	  				$('#foursubjecttitle').html(result.SubjectTitle);
 
-   				}else
 
-   				{
 
-   					$('#twosubjecttitle').html(result.SubjectTitle.substring(0,15)+'...');
 
-   	  				$('#foursubjecttitle').html(result.SubjectTitle.substring(0,15)+'...');
 
-   				}
 
-   			if(result.Result.length>0)
 
-   			{
 
-   				var str='';
 
-   	  			$.each(result.Result,function(i,item)
 
-   	  			{
 
-   	  					
 
-   	  			    countContentType(item.ContentType);
 
-   	  				if(item.QuestType==1)
 
-   	  				{
 
-   	  					var count=i+1;
 
-   	  					str+='<div SortQuestId="'+item.QuestId+'" class="myd-box-gray mt15"> <div class="pl15 myd-gray-tit relative hidden"><strong class="fl"><span>Q'+count+'</span><span class="c-org">【'+zhibiao(item.ContentType)+'】</span></strong>';
 
-   	  					str+='<span id="q'+count+'Tit" class=" fl q-tit" contenteditable="false" onblur=updateQuest(this,"'+item.QuestId+'")>'+item.Question+'</span>';
 
-   	  				    str+='<div class="absolute" style="right:13px; top:8px; font-size:0;"><a href="javascript:;" onclick=Qup(this,"'+item.QuestId+'") class="sort-up"></a><a href="javascript:;"  onclick=Qdown(this,"'+item.QuestId+'") class="ml10 sort-down"></a><a href="javascript:;" class="ml10 btn-edit" onclick="$(\'#q'+count+'Tit\').attr(\'contenteditable\',true).focus().select().addClass(\'tit-editable\')"></a></div></div>';
 
-   	  				    str+='<div class="myd-gray-con"><div class="mt5"><ul>';
 
-   	  				     $.each(item.SvQuestionItems,function(i,qitem)
 
-   	  				     {
 
-   	  				    	
 
-   	  				        str+='<li><span class="valign-m w100"><input type="radio" name="q2answer" class="valign-m" style="width:13px;" /><span id="item'+qitem.ItemId+'" class="answer-txt" contenteditable="false"';
 
-   	  				        str+='onblur=upateItem(this,"'+qitem.ItemId+'")>'+qitem.ItemCont+'</span></span>';
 
-   	  				        
 
-   	  				       str+='<a href="javascript:;" class="ml25 btn-edit" onclick="$(\'#item'+qitem.ItemId+'\').attr(\'contenteditable\',true).focus().select().addClass(\'answer-editable\')"></a> <a class="ml10" onclick=delItem("'+qitem.ItemId+'") href="javascript:;"><img  src="../../common/themes/default/images/nav-gb.png" /></a></li>';
 
-                            
 
-   	  				     })
 
-   	  				    str+=' </ul></div>';
 
-   	  				   str+='<div  id="newitem'+item.QuestId+'" style="display:none" class="mt15"><input type="text" class="inp-txt" style="width:300px;" placeholder="请输入选项内容" /><input type="button" class="ml10 btn-blue" onclick=addItem(this,'+item.QuestId+') value="确认" /><a href="javascript:;" onclick=hiddenItem(this,"newitem'+item.QuestId+'") class="ml5 btn-gray-s">取消</a></div>';
 
-   	  				   str+='<div class="mt20"><a href="javascript:;" onclick=getNewItem("newitem'+item.QuestId+'") class="btn-gray-l">增加选项</a><a href="javascript:;" onclick=getlogicalSetting(this,"'+item.QuestId+'") class="ml15 btn-gray-l">设置逻辑</a><a href="javascript:;" onclick=delQuest("'+item.QuestId+'") class="ml15 btn-gray-l c-org">删除题目</a></div>';
 
-   	  				   str+='</div></div>';
 
-   	  				}
 
-   	  				if(item.QuestType==2)
 
-   	  				{
 
-   	  					var count=i+1;
 
-   	  					str+='<div SortQuestId="'+item.QuestId+'" class="myd-box-gray mt15"> <div class="pl15 myd-gray-tit relative hidden"><strong class="fl"><span>Q'+count+'</span><span class="c-org">【'+zhibiao(item.ContentType)+'】</span></strong>';
 
-   	  					str+='<span id="q'+count+'Tit" class=" fl q-tit" contenteditable="false" onblur=updateQuest(this,"'+item.QuestId+'")>'+item.Question+'</span>';
 
-   	  				    str+='<div class="absolute" style="right:13px; top:8px; font-size:0;"><a href="javascript:;" onclick=Qup(this,"'+item.QuestId+'") class="sort-up"></a><a href="javascript:;"  onclick=Qdown(this,"'+item.QuestId+'") class="ml10 sort-down"></a><a href="javascript:;" class="ml10 btn-edit" onclick="$(\'#q'+count+'Tit\').attr(\'contenteditable\',true).focus().select().addClass(\'tit-editable\')"></a></div></div>';
 
-   	  				    str+='<div class="myd-gray-con"><div class="mt5"><ul>';
 
-   	  				     $.each(item.SvQuestionItems,function(i,qitem)
 
-   	  				     {
 
-   	  				    	
 
-   	  				        str+='<li><span class="valign-m w100"><input type="checkbox" name="q2answer" class="valign-m" style="width:13px;" /><span id="item'+qitem.ItemId+'" class="answer-txt" contenteditable="false"';
 
-   	  				        str+='onblur=upateItem(this,"'+qitem.ItemId+'")>'+qitem.ItemCont+'</span></span>';
 
-   	  				        
 
-   	  				       str+='<a href="javascript:;" class="ml25 btn-edit" onclick="$(\'#item'+qitem.ItemId+'\').attr(\'contenteditable\',true).focus().select().addClass(\'answer-editable\')"></a><a class="ml10" style="margin-top:5px" onclick=delItem("'+qitem.ItemId+'")  href="javascript:;"><img  src="../../common/themes/default/images/nav-gb.png" /></a> </li>';
 
-                            
 
-   	  				     })
 
-   	  				    str+=' </ul></div>';
 
-   	  				    str+='<div  id="newitem'+item.QuestId+'" style="display:none" class="mt15"><input type="text" class="inp-txt" style="width:300px;" placeholder="请输入选项内容" /><input type="button" class="ml10 btn-blue" onclick=addItem(this,'+item.QuestId+') value="确认" /><a href="javascript:;" onclick=hiddenItem(this,"newitem'+item.QuestId+'") class="ml5 btn-gray-s">取消</a></div>';
 
-   	  				   str+='<div class="mt20"><a href="javascript:;" onclick=getNewItem("newitem'+item.QuestId+'") class="ml5 btn-gray-s">增加选项</a><a href="javascript:;" onclick=delQuest("'+item.QuestId+'") class="ml15 btn-gray-l c-org">删除题目</a></div>';
 
-   	  				   str+='</div></div>';
 
-   	  				}
 
-   	  				if(item.QuestType==3)
 
-   	  				{
 
-   	  				    var count=i+1;
 
- 	  					str+='<div SortQuestId="'+item.QuestId+'" class="myd-box-gray mt15"> <div class="pl15 myd-gray-tit relative hidden"><strong class="fl"><span>Q'+count+'</span><span class="c-org">【'+zhibiao(item.ContentType)+'】</span></strong>';
 
- 	  					str+='<span id="q'+count+'Tit" class=" fl q-tit" contenteditable="false" onblur=updateQuest(this,"'+item.QuestId+'")>'+item.Question+'</span>';
 
- 	  				    str+='<div class="absolute" style="right:13px; top:8px; font-size:0;"><a href="javascript:;" onclick=Qup(this,"'+item.QuestId+'") class="sort-up"></a><a href="javascript:;"  onclick=Qdown(this,"'+item.QuestId+'") class="ml10 sort-down"></a><a href="javascript:;" class="ml10 btn-edit" onclick="$(\'#q'+count+'Tit\').attr(\'contenteditable\',true).focus().select().addClass(\'tit-editable\')"></a></div></div>';
 
-   	  					
 
- 	  				    str+='<div class="myd-gray-con"><div class="mt5"><textarea class="p5 inp-txtarea" style="width:520px;"></textarea></div><div class="mt20"><a href="javascript:;" onclick=delQuest("'+item.QuestId+'") class="ml15 btn-gray-l c-org">删除题目</a></div>';
 
- 	  				    str+='</div></div>';
 
-   	  				}
 
-   	  				if(item.QuestType==4)
 
-   	  				{
 
-   	  				    var count=i+1;
 
- 	  					str+='<div SortQuestId="'+item.QuestId+'" class="myd-box-gray mt15"> <div class="pl15 myd-gray-tit relative hidden"><strong class="fl"><span>Q'+count+'</span><span class="c-org">【'+zhibiao(item.ContentType)+'】</span></strong>';
 
- 	  					str+='<span id="q'+count+'Tit" class=" fl q-tit" contenteditable="false" onblur=updateQuest(this,"'+item.QuestId+'")>'+item.Question+'</span>';
 
- 	  				    str+='<div class="absolute" style="right:13px; top:8px; font-size:0;"><a href="javascript:;" onclick=Qup(this,"'+item.QuestId+'") class="sort-up"></a><a href="javascript:;"  onclick=Qdown(this,"'+item.QuestId+'") class="ml10 sort-down"></a><a href="javascript:;" class="ml10 btn-edit" onclick="$(\'#q'+count+'Tit\').attr(\'contenteditable\',true).focus().select().addClass(\'tit-editable\')"></a></div></div>';
 
- 	  				    str+='<div class="myd-gray-con"><table class="tb-sjtj" width="100%">';
 
- 	  				    str+='<tr><td class="thead-1">子项</td>';
 
- 	  				    $.each(item.ChildrenMatrixQuestion[0].MatrixQuestItems,function(i,marxitem)
 
- 	  				    {
 
- 	  				    	str+='<td class="thead-1"><span>'+marxitem.ItemCont+'</span> <a href="javascript:;" onclick="delcol(this)"><img src="../../common/themes/default/images/nav-gb.png" /></a></td>';
 
- 	  				    })
 
- 	  				    str+='</tr>';
 
- 	  				    $.each(item.ChildrenMatrixQuestion,function(i,mquest)
 
- 	  		  			{
 
- 	  		  				str+='<tr><td>'+mquest.Question+' <a href="javascript:;" quesid='+mquest.QuestId+' onclick="delrow(this)"><img  src="../../common/themes/default/images/nav-gb.png" /></a></td>';
 
- 	  		  			   $.each(mquest.MatrixQuestItems,function(i,cmarxitem)
 
- 	  		  			   {
 
- 	  		  				 str+='<td><input type="radio" itemid='+cmarxitem.ItemId+' name="fwtd" /></td>';  
 
- 	  		  			   });
 
- 	  		  			  str+='</tr>';
 
- 	  		  			})
 
- 	  		  			str+='</table>';
 
- 	  		  			 str+='<div  id="newitem'+item.QuestId+'" style="display:none" class="mt15"><input type="text" class="inp-txt" style="width:300px;" placeholder="请输入子项内容" /><input type="button" class="ml10 btn-blue" onclick=addMatrQuest(this,"'+item.QuestId+'") value="确认" /><a href="javascript:;" onclick=hiddenItem(this,"newitem'+item.QuestId+'") class="ml5 btn-gray-s">取消</a></div>';
 
- 	  		  		     str+='<div  id="newchilditem'+item.QuestId+'" style="display:none" class="mt15"><input type="text" class="inp-txt" style="width:300px;" placeholder="请输入选项内容" /><input type="button" class="ml10 btn-blue" onclick=addMatrItem(this,"'+item.QuestId+'") value="确认" /><a href="javascript:;" onclick=hiddenItem(this,"newchilditem'+item.QuestId+'") class="ml5 btn-gray-s">取消</a></div>';
 
- 	  				    str+=' <div class="mt20"><a href="javascript::" onclick=getNewItem("newitem'+item.QuestId+'") class="ml5 btn-gray-s">增加子项</a><a href="javascript:;"onclick=newchilditem("newchilditem'+item.QuestId+'") class="ml15 btn-gray-l">增加选项</a><a href="javascript:;" onclick=delMatrixQuest("'+item.QuestId+'") class="ml15 btn-gray-l c-org">删除题目</a></div></div></div>';
 
-   	  				}
 
-   	  				if(item.QuestType==5)
 
-   	  				{
 
-   	  				    var count=i+1;
 
- 	  					str+='<div SortQuestId="'+item.QuestId+'" class="myd-box-gray mt15"> <div class="pl15 myd-gray-tit relative hidden"><strong class="fl"><span>Q'+count+'</span><span class="c-org">【'+zhibiao(item.ContentType)+'】</span></strong>';
 
- 	  					str+='<span id="q'+count+'Tit" class=" fl q-tit" contenteditable="false" onblur=updateQuest(this,"'+item.QuestId+'")>'+item.Question+'</span>';
 
- 	  				    str+='<div class="absolute" style="right:13px; top:8px; font-size:0;"><a href="javascript:;" onclick=Qup(this,"'+item.QuestId+'") class="sort-up"></a><a href="javascript:;" onclick=Qdown(this,"'+item.QuestId+'") class="ml10 sort-down"></a><a href="javascript:;" class="ml10 btn-edit" onclick="$(\'#q'+count+'Tit\').attr(\'contenteditable\',true).focus().select().addClass(\'tit-editable\')"></a></div></div>';
 
- 	  				    str+='<div class="myd-gray-con"><table class="tb-sjtj" width="100%">';
 
- 	  				    str+='<tr><td class="thead-1">子项</td>';
 
- 	  				    $.each(item.ChildrenMatrixQuestion[0].MatrixQuestItems,function(i,marxitem)
 
- 	  				    {
 
- 	  				    	str+='<td class="thead-1"><span>'+marxitem.ItemCont+'</span> <a href="javascript:;" onclick="delcol(this)"><img src="../../common/themes/default/images/nav-gb.png" /></a></td>';
 
- 	  				    })
 
- 	  				    str+='</tr>';
 
- 	  				    $.each(item.ChildrenMatrixQuestion,function(i,mquest)
 
- 	  		  			{
 
- 	  		  				str+='<tr><td>'+mquest.Question+' <a href="javascript:;" quesid='+mquest.QuestId+' onclick="delrow(this)"><img  src="../../common/themes/default/images/nav-gb.png" /></a></td>';
 
- 	  		  			   $.each(mquest.MatrixQuestItems,function(i,cmarxitem)
 
- 	  		  			   {
 
- 	  		  				 str+='<td><input type="checkbox" itemid='+cmarxitem.ItemId+' name="fwtd" /></td>';  
 
- 	  		  			   });
 
- 	  		  			  str+='</tr>';
 
- 	  		  			})
 
- 	  		  			str+='</table>';
 
- 	  		  			 str+='<div  id="newitem'+item.QuestId+'" style="display:none" class="mt15"><input type="text" class="inp-txt" style="width:300px;" placeholder="请输入子项内容" /><input type="button" class="ml10 btn-blue" onclick=addMatrQuest(this,"'+item.QuestId+'") value="确认" /><a href="javascript:;" onclick=hiddenItem(this,"newitem'+item.QuestId+'") class="ml5 btn-gray-s">取消</a></div>';
 
- 	  		  		     str+='<div  id="newchilditem'+item.QuestId+'" style="display:none" class="mt15"><input type="text" class="inp-txt" style="width:300px;" placeholder="请输入选项内容" /><input type="button" class="ml10 btn-blue" onclick=addMatrItem(this,"'+item.QuestId+'") value="确认" /><a href="javascript:;" onclick=hiddenItem(this,"newchilditem'+item.QuestId+'") class="ml5 btn-gray-s">取消</a></div>';
 
- 	  				    str+=' <div class="mt20"><a href="javascript::" onclick=getNewItem("newitem'+item.QuestId+'") class="ml5 btn-gray-s">增加子项</a><a href="javascript:;"onclick=newchilditem("newchilditem'+item.QuestId+'") class="ml15 btn-gray-l">增加选项</a><a href="javascript:;" onclick=delMatrixQuest("'+item.QuestId+'") class="ml15 btn-gray-l c-org">删除题目</a></div></div></div>';
 
-   	  				}
 
-   	  					
 
-   	  				
 
-   	  			});
 
-   	  		    $('#ifnoQuest').hide();
 
-   	  		    showContentType();
 
-   	  			$('#core').append(str);
 
-   	  			
 
-   			}else
 
-   			{
 
-   				$('#ifnoQuest').show();
 
-   			}
 
-   			
 
- 		}else
 
- 		{
 
- 	    	YihuUtil.dialog({
 
- 	 		id: 'testID',
 
- 	 	    content: result.Message,
 
- 	 	    lock: true,
 
- 	 	    button: [
 
- 	 	        {
 
- 	 	            name: '确定',
 
- 	 	            callback: function () {
 
- 	 	        	
 
- 	 	                return true;
 
- 	 	            },
 
- 	 	            focus: true
 
- 	 	        }
 
- 	 	    ]
 
- 	 		
 
- 	 	   });
 
- 		}
 
- 		
 
- 		
 
- 		
 
-   	}, "json");	
 
- }
 
- function myZone()
 
- {
 
- 	$('#getmyzone').empty();
 
-   	var params={};
 
-     var session=getSession();
 
-   	params.OrgID=session.orgid;
 
-   	$.post('/WbjUI/wbj2/business/web/wtbj_myZone.do', params, function (result) {
 
-   		if(result.Code==10000)
 
- 		{
 
-   			var str='';
 
-   			$.each(result.Result,function(i,item)
 
-   			{
 
-   				str+='<li><input name="myzonecheckbox" type="checkbox" value='+item.QuestId+' />'+item.Question+'</li>';
 
-   			});
 
-   			$('#getmyzone').append(str);
 
- 		}else
 
- 		{
 
- 	    	YihuUtil.dialog({
 
- 	 		id: 'testID',
 
- 	 	    content: result.Message,
 
- 	 	    lock: true,
 
- 	 	    button: [
 
- 	 	        {
 
- 	 	            name: '确定',
 
- 	 	            callback: function () {
 
- 	 	        	
 
- 	 	                return true;
 
- 	 	            },
 
- 	 	            focus: true
 
- 	 	        }
 
- 	 	    ]
 
- 	 		
 
- 	 	   });
 
- 		}
 
- 		
 
- 		
 
- 		
 
-   	}, "json");	
 
- }
 
- function insertQuest()
 
- {
 
- 	
 
- 	
 
- 	
 
- 	var params={};
 
- 	var session=getSession();
 
- 	params.ContentType=$('#ContentType').val();
 
- 	params.ObjType=$('#ObjType').val();
 
- 	params.QuestType=$('#QuestType').val();
 
- 	params.SubjectId=$('#onlySubjectId').val();
 
-     params.OperatorID=session.userId;
 
-     params.OperatorName=session.operatorname;
 
- 	$.post('/WbjUI/wbj2/business/web/wtbj_addDetailQuestion.do', params, function (result) {
 
- 		if(result.Code==10000)
 
- 		{
 
- 			closepop('addQuestion');
 
-   			getCore();
 
- 		}else
 
- 		{
 
- 	    	YihuUtil.dialog({
 
- 	 		id: 'testID',
 
- 	 	    content: result.Message,
 
- 	 	    lock: true,
 
- 	 	    button: [
 
- 	 	        {
 
- 	 	            name: '确定',
 
- 	 	            callback: function () {
 
- 	 	        	
 
- 	 	                return true;
 
- 	 	            },
 
- 	 	            focus: true
 
- 	 	        }
 
- 	 	    ]
 
- 	 		
 
- 	 	   });
 
- 		}
 
- 	}, "json");	
 
- 	
 
- }
 
- function getmyquestbyid()
 
- {
 
- 	var sbid=$('#myzoneselect').val();
 
- 	if(sbid==null||sbid==''||sbid==undefined)
 
- 	{
 
- 		myZone();
 
- 		return;
 
- 	}
 
- 	if(sbid==0)
 
- 	{
 
- 		myzone();
 
- 	}
 
- 	else
 
- 	{
 
- 		
 
- 		var params={};
 
- 		params.SubjectId=sbid;
 
- 		$.post('/WbjUI/wbj2/business/web/wtbj_myZoneQuestbySubjectId.do', params, function (result) {
 
- 			if(result.Code==10000)
 
- 			{
 
- 	  			var str='';
 
- 	  			$.each(result.Result,function(i,item)
 
- 	  			{
 
- 	  				str+='<li><input name="myzonecheckbox" type="checkbox" value='+item.QuestId+' />'+item.Question+'</li>';
 
- 	  			});
 
- 	  			$('#getmyzone').empty();
 
- 	  			$('#getmyzone').append(str);
 
- 			}else
 
- 			{
 
- 		    	YihuUtil.dialog({
 
- 		 		id: 'testID',
 
- 		 	    content: result.Message,
 
- 		 	    lock: true,
 
- 		 	    button: [
 
- 		 	        {
 
- 		 	            name: '确定',
 
- 		 	            callback: function () {
 
- 		 	        	
 
- 		 	                return true;
 
- 		 	            },
 
- 		 	            focus: true
 
- 		 	        }
 
- 		 	    ]
 
- 		 		
 
- 		 	   });
 
- 			}
 
- 		}, "json");	
 
- 	}
 
- }
 
- function queryPlatformQuestion()
 
- {
 
- 	$('#getPlatform').empty();
 
- 	var params={};
 
- 	params.ContentType=$('#QContentType').val();
 
- 	params.ObjType=$('#QObjType').val();
 
- 	$.post('/WbjUI/wbj2/business/web/wtbj_queryPlatformQuestion.do', params, function (result) {
 
- 		if(result.Code==10000)
 
- 		{
 
-   			var str='';
 
-   			$.each(result.Result,function(i,item)
 
-   			{
 
-   				str+='<li><input name="platformcheckbox" type="checkbox" value='+item.QuestId+' />'+item.Question+'</li>';
 
-   			});
 
-   			$('#getPlatform').append(str);
 
- 		}else
 
- 		{
 
- 	    	YihuUtil.dialog({
 
- 	 		id: 'testID',
 
- 	 	    content: result.Message,
 
- 	 	    lock: true,
 
- 	 	    button: [
 
- 	 	        {
 
- 	 	            name: '确定',
 
- 	 	            callback: function () {
 
- 	 	        	
 
- 	 	                return true;
 
- 	 	            },
 
- 	 	            focus: true
 
- 	 	        }
 
- 	 	    ]
 
- 	 		
 
- 	 	   });
 
- 		}
 
- 		
 
- 		
 
- 		
 
- 	}, "json");	
 
- 	
 
- }
 
- function optionmyZoneQuestion()
 
- {
 
-   	var params={};
 
-   	
 
-     var session=getSession();
 
-   	params.SubjectId=$('#onlySubjectId').val();
 
-   	params.OperatorId=session.userId;
 
-   	params.OperatorName=session.operatorname;
 
- 	  var str='';
 
- 		
 
- 	  $("input[name='myzonecheckbox']:checked").each(function(){   
 
- 		str+=$(this).val()+",";   
 
-    
 
- 	 }); 
 
- 		if(str==null||str==''||str==undefined)
 
- 		{
 
- 			var z="请勾选";
 
- 			Commonjs.alert(z);
 
- 			return;
 
- 		}
 
- 	params.OptionQuestionid=str;
 
-   	$.post('/WbjUI/wbj2/business/web/wtbj_optionQuestion.do', params, function (result) {
 
-   		if(result.Code==10000)
 
- 		{
 
-   			getCore();
 
-   			closepop('chooseQuestion');
 
- 		}else
 
- 		{
 
- 	    	YihuUtil.dialog({
 
- 	 		id: 'testID',
 
- 	 	    content: result.Message,
 
- 	 	    lock: true,
 
- 	 	    button: [
 
- 	 	        {
 
- 	 	            name: '确定',
 
- 	 	            callback: function () {
 
- 	 	        	
 
- 	 	                return true;
 
- 	 	            },
 
- 	 	            focus: true
 
- 	 	        }
 
- 	 	    ]
 
- 	 		
 
- 	 	   });
 
- 		}
 
- 		
 
- 		
 
- 		
 
-   	}, "json");	
 
- }
 
- function optionPlatQuestion()
 
- {
 
-   	var params={};
 
-   	
 
-     var session=getSession();
 
-   	params.SubjectId=$('#onlySubjectId').val();
 
-   	params.OperatorId=session.userId;
 
-   	params.OperatorName=session.operatorname;
 
- 	  var str='';
 
- 		
 
- 	  $("input[name='platformcheckbox']:checked").each(function(){   
 
- 		str+=$(this).val()+",";   
 
-    
 
- 	 }); 
 
- 	if(str==null||str==''||str==undefined)
 
- 	{
 
- 		var z="请勾选";
 
- 		Commonjs.alert(z);
 
- 		return;
 
- 	}
 
- 	params.OptionQuestionid=str;
 
-   	$.post('/WbjUI/wbj2/business/web/wtbj_optionQuestion.do', params, function (result) {
 
-   		if(result.Code==10000)
 
- 		{
 
-   			getCore();
 
-   			closepop('chooseQuestion');
 
- 		}else
 
- 		{
 
- 	    	YihuUtil.dialog({
 
- 	 		id: 'testID',
 
- 	 	    content: result.Message,
 
- 	 	    lock: true,
 
- 	 	    button: [
 
- 	 	        {
 
- 	 	            name: '确定',
 
- 	 	            callback: function () {
 
- 	 	        	
 
- 	 	                return true;
 
- 	 	            },
 
- 	 	            focus: true
 
- 	 	        }
 
- 	 	    ]
 
- 	 		
 
- 	 	   });
 
- 		}
 
- 		
 
- 		
 
- 		
 
-   	}, "json");	
 
- }
 
- function closepop(id){
 
- 	document.getElementById(id).style.display="none"
 
- }
 
- /*显示弹窗*/
 
- function showpop(id){
 
- 	document.getElementById(id).style.display="block"
 
- }
 
- function alertMessage(msg,action){
 
- 	
 
- 	YihuUtil.dialog({
 
- 		title:"提示",
 
- 		content: msg,
 
- 		button : [{
 
- 				name : '确定',
 
- 				callback : action 
 
- 			}]
 
- 	});
 
- }
 
- function zhibiao(id)
 
- {
 
- 	
 
- 	str='';
 
- 	switch (parseInt(id)) {
 
-     case 1:
 
-     	str='医生服务';
 
-         break;
 
-     case 2:
 
-     	str='护士服务';
 
-         break;
 
-     case 3:
 
-     	str='医技服务';
 
-         break;
 
-     case 4:
 
-     	str='药房服务';
 
-         break;
 
-     case 5:
 
-     	str='收费服务';
 
-         break;
 
-     case 6:
 
-     	str='就诊环境';
 
-         break;
 
-     case 7:
 
-     	str='后勤保障';
 
-         break;
 
-     case 8:
 
-     	str='导医导诊';
 
-         break;
 
-     case 9:
 
-     	str='就诊流程';
 
-         break;
 
-     case 10:
 
-     	str='医风医德';
 
-         break;
 
-     case 11:
 
-     	str='忠诚指数';
 
-         break;
 
-     case 12:
 
-     	str='其他问题';
 
-         break;
 
-     case 13:
 
-     	str='通用指标';
 
-         break;
 
-     default:
 
-     	str='未知指标';
 
- 	}
 
-    return str;
 
- 	
 
- }
 
- function countContentType(id)
 
- {
 
-   		     
 
- 		      if(id==1)
 
- 		      {
 
- 		        fl1++;
 
- 		      }
 
-               if(id==2)
 
- 		      {
 
- 		        fl2++;
 
- 		      }
 
- 		     if(id==3)
 
- 		      {
 
- 		        fl3++;
 
- 		      }
 
-               if(id==4)
 
- 		      {
 
- 		        fl4++;
 
- 		      }
 
- 		      if(id==5)
 
- 		      {
 
- 		        fl5++;
 
- 		      }
 
-               if(id==6)
 
- 		      {
 
- 		        fl6++;
 
- 		      }
 
- 		      if(id==7)
 
- 		      {
 
- 		        fl7++;
 
- 		      }
 
-               if(id==8)
 
- 		      {
 
- 		        fl8++;
 
- 		      } 
 
- 		      if(id==9)
 
- 		      {
 
- 		        fl9++;
 
- 		      }
 
-               if(id==10)
 
- 		      {
 
- 		        fl10++;
 
- 		      }
 
- 		      if(id==11)
 
- 		      {
 
- 		        fl11++;
 
- 		      }
 
-               if(id==12)
 
- 		      {
 
- 		        fl12++;
 
- 		      } 
 
- 		      if(id==13)
 
- 		      {
 
- 		        fl13++;
 
- 		      } 
 
- }
 
- function showContentType()
 
- {
 
- 	if(fl1==0&&fl2==0&&fl3==0&&fl4==0&&fl5==0&&fl6==0&&fl7==0&&fl8==0&&fl9==0&&fl10==0&&fl11==0&&fl12==0&&fl13==0)
 
- 	{
 
- 		
 
- 		 $('#zhibiaoul').append('<li>暂无指标</li>');
 
- 	}else
 
- 	{
 
- 		if(fl1>0)
 
- 	    {
 
- 	       $('#zhibiaoul').append('<li>医生服务('+fl1+')</li>');
 
- 	    }
 
- 	    if(fl2>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>护士服务('+fl2+')</li>');
 
- 	    }
 
- 	    if(fl3>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>医技服务('+fl3+')</li>');
 
- 	    }
 
- 	    if(fl4>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>药房服务('+fl4+')</li>');
 
- 	    }
 
- 	    if(fl5>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>收费服务('+fl5+')</li>');
 
- 	    }
 
- 	    if(fl6>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>就诊环境('+fl6+')</li>');
 
- 	    }
 
- 	    if(fl7>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>后勤保障('+fl7+')</li>');
 
- 	    }
 
- 	    if(fl8>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>导医导诊('+fl8+')</li>');
 
- 	    }
 
- 	    if(fl9>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>就诊流程('+fl9+')</li>');
 
- 	    }
 
- 	    if(fl10>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>医风医德('+fl10+')</li>');
 
- 	    }
 
- 	    if(fl11>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>忠诚指数('+fl11+')</li>');
 
- 	    }
 
- 	    if(fl12>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('<li>其他问题('+fl12+')</li>');
 
- 	    }
 
- 	    if(fl13>0)
 
- 	    {
 
- 	      $('#zhibiaoul').append('通用指标('+fl13+')</li>');
 
- 	    }
 
- 	}
 
-     
 
- }
 
- function getSession(){
 
- 	
 
- 	var session = YihuUtil.getSession();
 
- 	
 
- 	return session;
 
- 	
 
- }
 
- function uniteMessage(value,alertchar)
 
- {
 
- 	var tag=false;
 
- 	if(value==null||value==''||value==undefined)
 
- 	{
 
- 		var str="不能为空!!";
 
- 		tag=true;
 
- 		Commonjs.alert(str);
 
- 		return true;
 
- 		
 
- 	}
 
- 	value=trim(value);
 
- 	//alert("xx"+value);
 
- 	//alert(value.replace(/([^\x00-\xff])/g,'**').length);
 
- 	//if(value.replace(/([^\x00-\xff])/g,'**').length>alertchar)
 
- 	if(value.length>alertchar)
 
- 	{
 
- 		var str="请勿超过"+alertchar+"个字符";
 
- 		Commonjs.alert(str);
 
- 		tag=true;
 
- 		return true;
 
- 	}
 
- 	return false;
 
- 	
 
- }
 
- //前后空格
 
- function trim(str){   
 
-     return str.replace(/^(\s|\xA0)+|(\s|\xA0)+$/g, '');   
 
- }  
 
- /**
 
-  * 清空特殊字符
 
-  */
 
- function stripscriptName(value) {
 
-   var  val=value;	  
 
-   var containSpecial = RegExp(/[(\ )(\~)(\!)(\@)(\#)(\$)(\¥)(\……)(\*)(\&)(\【)(\】)(\。)(\,)(\%)(\^)(\&)(\*)(\-)(\_)(\+)(\=)(\|)(\\)(\;)(\:)(\')(\")(\,)(\.)(\/)(\?)]+/);    
 
-   var rs = "";    
 
-   for (var i = 0; i < val.length; i++) {    
 
-   	rs = rs + val.substr(i, 1).replace(containSpecial, '');
 
-   } 
 
-   return rs
 
- }
 
 
  |