ca6eb3812ed827294b42618ffbde5bacd009cc09.svn-base 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966
  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title></title>
  7. <%@include file="../../../include.jsp" %>
  8. <script type="text/javascript" src="<%=path%>/scripts/business/exercise/examineManagement/questionBankAddEdit.js"></script>
  9. <style type="text/css">
  10. .answer_content{
  11. margin-left:5px;
  12. }
  13. .add_table_style {
  14. border-collapse: separate;
  15. }
  16. .option_table_style{
  17. border-style:solid;
  18. border-width:1px;
  19. border-color:#cdcaca;
  20. margin:0px 20px 0px 0px;
  21. border-collapse:collapse;
  22. width: 600px;
  23. }
  24. </style>
  25. <script type="text/javascript">
  26. var fd_id = "<%=request.getParameter("fd_id")%>";
  27. var versionId = "<%=request.getParameter("versionId")%>"//版本号id
  28. //取得用户真实名字
  29. var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  30. //部门id
  31. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  32. //部门id
  33. var unitId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  34. //部门名称
  35. var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
  36. //父部门id
  37. var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
  38. var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  39. var opt_type = 1;
  40. var answer_option = '';
  41. var answer_sum = 4;
  42. $(function(){
  43. $("#goback").hover(function(){
  44. $(this).attr("src","/nwyj/images/temp/back_hover.png");
  45. },function(){
  46. $(this).attr("src","/nwyj/images/temp/back.png");
  47. });
  48. $("#QUESTION_CLASSIFY_603").initCanstSelect("BM_ECM_TRAIN_EXAMINE_QUESTION_CLASSIFY");//内容类别
  49. $("#QUESTION_TYPE_603").initCanstSelect("BM_ECM_TRAIN_EXAMINE_QUESTION_TYPE");//题目类型
  50. //$("#QUESTION_SCORE_603").initCanstSelect("BM_ECM_TRAIN_EXAMINE_QUESTION_SCORE");//分值
  51. //修改表单
  52. if(!(fd_id=="null"||fd_id=="")){
  53. $("#titleShow").text("修改考试题目");
  54. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  55. var params = {
  56. classid : '603',
  57. objectID : fd_id
  58. };
  59. $.request.query(url,params,function(data){
  60. var questionType = data.QUESTION_TYPE_603;//题目类型
  61. var question_answer = data.QUESTION_ANSWER_603;//答案
  62. if(questionType==4){
  63. answer_sum = getAnswerCount(question_answer.split("|").length);//获取答案数量
  64. }else{
  65. answer_sum = getAnswerCount(0);
  66. }
  67. opt_type = data.ANSWER_TYPE_603;
  68. answer_option = data.ANSWER_OPTION_603;//答案选项类型
  69. createAnswerDomByType(data.QUESTION_TYPE_603,1);//创建表格
  70. $('#editForm').ajaxWrite({data:data});
  71. checkedByAnswer(question_answer,data.QUESTION_TYPE_603);//勾选答案
  72. checkApplicableType(data.APPLICABLE_OBJECT_603);//勾选适用对象
  73. answerType(data.ANSWER_TYPE_603);//勾选选项类型
  74. /* var question_score = data.QUESTION_SCORE_603;//题目得分
  75. if(questionType ==4){
  76. var score = question_score.split("|");
  77. $("#QUESTION_SCORE_603").val(score[0]);
  78. $("#opt_input").val(score[1].split(",").length)
  79. } */
  80. //查询子表选项内容并赋值
  81. var url = $.pathname() + '/ws/Examine/ExamineManagementService/getAnswerNum/';
  82. var params = {
  83. question_id : fd_id
  84. };
  85. //if(questionType!=3){//当题目类型不是判断题时
  86. $.ajax({
  87. url:url,
  88. data:params,
  89. type : 'post',
  90. dataType:"json",
  91. success:function(data){
  92. if(questionType == 4){
  93. var fd_ids_604 = "";
  94. for (var i = 0; i < data.length; i++) {
  95. var $option = $("#option_"+data[i].OPTION+"_"+data[i].OPTION_INDEX);
  96. if($option){
  97. $option.parent().find(".answer_content").val(data[i].OPTION_CONTENT);
  98. $option.parent().find(".answer_id").val(data[i].FD_OBJECTID);
  99. //把每个单项分赋值
  100. //$option.parent().parent().parent().find("input[name='score_option_"+data[i].OPTION_INDEX+"']").val(question_score.split("|")[1].split(",")[data[i].OPTION_INDEX-1]);
  101. }
  102. //$(".answer_content").eq(i).val(data[i].OPTION_CONTENT);
  103. fd_ids_604 += data[i].FD_OBJECTID + ",";
  104. }
  105. fd_ids_604 = fd_ids_604.substring(0, fd_ids_604.length-1);
  106. $("#FD_OBJECTID604").val(fd_ids_604);//保存四个选项主键,用于修改时定位到数据库记录
  107. }else{
  108. var fd_ids_604 = "";
  109. for (var i = 0; i < data.length; i++) {
  110. var $option = $("#option_"+data[i].OPTION);
  111. if($option){
  112. if(opt_type == 1){
  113. $option.parent().find(".answer_content").val(data[i].OPTION_CONTENT)
  114. }else{
  115. //$option.parent().find("#uploadify").val(data[i].OPTION_CONTENT);
  116. $option.parent().find("#file_name").val(data[i].OPTION_CONTENT)
  117. }
  118. }
  119. //$(".answer_content").eq(i).val(data[i].OPTION_CONTENT);
  120. fd_ids_604 += data[i].FD_OBJECTID + ",";
  121. }
  122. fd_ids_604 = fd_ids_604.substring(0, fd_ids_604.length-1);
  123. $("#FD_OBJECTID604").val(fd_ids_604);//保存四个选项主键,用于修改时定位到数据库记录
  124. }
  125. },
  126. error:function(){
  127. top.Dialog.alert("访问服务失败!");
  128. }
  129. });
  130. //}
  131. });
  132. }else{//新增
  133. $("#titleShow").text("新增考试题目");
  134. $("#INPUT_NAME_603").val(realName);
  135. $("#INPUT_PERSON_DEPT_603").val(deptId);
  136. $("#INPUT_PERSON_UNIT_603").val(unitId);
  137. $("#INPUT_TIME_603").val(getDateTime());
  138. $("#INPUT_NAME_ID_603").val(userId);
  139. $("#QUESTION_VERSION_ID_603").val(versionId);
  140. createAnswerDomByType("1",0);
  141. }
  142. });
  143. function getAnswerCount(opt_sum){//选项个数
  144. var str = 0;
  145. $.ajax({
  146. url:$.pathname() + '/ws/Examine/ExamineManagementService/getAnswerNum/',
  147. data:{question_id : fd_id},
  148. type : 'post',
  149. dataType:"json",
  150. async:false,
  151. success:function(data){
  152. if(opt_sum == 0){
  153. str = data.length;
  154. }else{
  155. var arr = new Array();
  156. for(var j=0;j<opt_sum;j++){//初始化
  157. arr[j]=0;
  158. }
  159. for(var i=0;i<data.length;i++){
  160. arr[data[i].OPTION_INDEX-1]++;
  161. }
  162. str = arr;
  163. }
  164. }
  165. });
  166. return str;
  167. }
  168. var is_add = 0;//判断是否添加了inut
  169. //根据题目类型创建答案选项节点
  170. function createAnswerDomByType(type,isEdit){/***isEdit 0:新增 1:修改***/
  171. if(type=="4"){
  172. $(".answer_con_dom").remove();//先清空容器
  173. $(".option_table_style").parent().parent().remove();
  174. if(is_add == 0){
  175. $("#answer_opt").append("<input type='text' value='4' id='opt_input' inputMode='numberOnly' maxlength='1' style='height:20px;width:60px;text-align:center;'/><label> 个选项答案</label>");
  176. is_add ++;
  177. }
  178. }else{
  179. $(".answer_con_dom").remove();
  180. $("#answer_opt").children().remove();
  181. is_add = 0;
  182. $(".option_table_style").parent().parent().remove();//先清空容器
  183. }
  184. /*******修改页面*******/
  185. if(isEdit == 1){
  186. if(opt_type==1){//文字选项
  187. if(type=="1"){//单选题
  188. if(answer_sum==2){
  189. $("#answer_opt").parent().after(textInput2('B','radio','block','none')).after(textInput1('A','radio'));
  190. }else if(answer_sum==3){
  191. $("#answer_opt").parent().after(textInput2('C','radio','block','none'))
  192. .after(textInput2('B','radio','none','none')).after(textInput1('A','radio'));
  193. }else if(answer_sum==4){
  194. $("#answer_opt").parent().after(textInput2('D','radio','block','block'))
  195. .after(textInput2('C','radio','none','none')).after(textInput2('B','radio','none','none')).after(textInput1('A','radio'));
  196. }else if(answer_sum==5){
  197. $("#answer_opt").parent().after(textInput2('E','radio','block','block')).after(textInput2('D','radio','none','none'))
  198. .after(textInput2('C','radio','none','none')).after(textInput2('B','radio','none','none')).after(textInput1('A','radio'));
  199. }else if(answer_sum==6){
  200. $("#answer_opt").parent().after(textInput2('F','radio','block','block')).after(textInput2('E','radio','none','none')).after(textInput2('D','radio','none','none'))
  201. .after(textInput2('C','radio','none','none')).after(textInput2('B','radio','none','none')).after(textInput1('A','radio'));
  202. }else if(answer_sum==7){
  203. $("#answer_opt").parent().after(textInput2('G','radio','block','block')).after(textInput2('F','radio','block','block')).after(textInput2('E','radio','none','none'))
  204. .after(textInput2('D','radio','none','none')).after(textInput2('C','radio','none','none')).after(textInput2('B','radio','none','none')).after(textInput1('A','radio'));
  205. }
  206. }else if(type=="2"){//多选题
  207. if(answer_sum==2){
  208. $("#answer_opt").parent().after(textInput2('B','checkbox','block','none')).after(textInput1('A','checkbox'));
  209. }else if(answer_sum==3){
  210. $("#answer_opt").parent().after(textInput2('C','checkbox','block','none'))
  211. .after(textInput2('B','checkbox','none','none')).after(textInput1('A','checkbox'));
  212. }else if(answer_sum==4){
  213. $("#answer_opt").parent().after(textInput2('D','checkbox','block','block'))
  214. .after(textInput2('C','checkbox','none','none')).after(textInput2('B','checkbox','none','none')).after(textInput1('A','checkbox'));
  215. }else if(answer_sum==5){
  216. $("#answer_opt").parent().after(textInput2('E','checkbox','block','block')).after(textInput2('D','checkbox','none','none'))
  217. .after(textInput2('C','checkbox','none','none')).after(textInput2('B','checkbox','none','none')).after(textInput1('A','checkbox'));
  218. }else if(answer_sum==6){
  219. $("#answer_opt").parent().after(textInput2('F','checkbox','block','block')).after(textInput2('E','checkbox','none','none')).after(textInput2('D','checkbox','none','none'))
  220. .after(textInput2('C','checkbox','none','none')).after(textInput2('B','checkbox','none','none')).after(textInput1('A','checkbox'));
  221. }else if(answer_sum==7){
  222. $("#answer_opt").parent().after(textInput2('G','checkbox','block','block')).after(textInput2('F','checkbox','block','block')).after(textInput2('E','checkbox','none','none'))
  223. .after(textInput2('D','checkbox','none','none')).after(textInput2('C','checkbox','none','none')).after(textInput2('B','checkbox','none','none')).after(textInput1('A','checkbox'));
  224. }
  225. }
  226. /*******情景选择题******/
  227. if(type == "4"){//情景选择题
  228. var option = answer_option.split("|");
  229. var self = $("#answer_opt").parent();
  230. for(var i=option.length-1;i>=0;i--){
  231. var val = '';
  232. if(option[i] ==1){
  233. val = 'radio';
  234. }else{
  235. val = 'checkbox';
  236. }
  237. self.after(textInput3(val,i+1,option[i],answer_sum[i]))
  238. }
  239. //$("#answer_opt").parent().after(textInput3('checkbox',2)).after(textInput3('radio',1))
  240. }
  241. }else{//图片选项
  242. if(type=="1"){//单选题
  243. if(answer_sum==2){
  244. $("#answer_opt").parent().after(fileInput2('B','radio','block','none')).after(fileInput1('A','radio'));
  245. }else if(answer_sum==3){
  246. $("#answer_opt").parent().after(fileInput2('C','radio','block','none'))
  247. .after(fileInput2('B','radio','none','none')).after(fileInput1('A','radio'));
  248. }else if(answer_sum==4){
  249. $("#answer_opt").parent().after(fileInput2('D','radio','block','block'))
  250. .after(fileInput2('C','radio','none','none')).after(fileInput2('B','radio','none','none')).after(fileInput1('A','radio'))
  251. }else if(answer_sum==5){
  252. $("#answer_opt").parent().after(fileInput2('E','radio','block','block')).after(fileInput2('D','radio','none','none'))
  253. .after(fileInput2('C','radio','none','none')).after(fileInput2('B','radio','none','none')).after(fileInput1('A','radio'));
  254. }else if(answer_sum==6){
  255. $("#answer_opt").parent().after(fileInput2('F','radio','block','block')).after(fileInput2('E','radio','none','none')).after(fileInput2('D','radio','none','none'))
  256. .after(fileInput1('C','radio','none','none')).after(fileInput2('B','radio','none','none')).after(fileInput1('A','radio'));
  257. }else if(answer_sum==7){
  258. $("#answer_opt").parent().after(fileInput2('G','radio','block','block')).after(fileInput2('F','radio','block','block')).after(fileInput2('E','radio','none','none'))
  259. .after(fileInput2('D','radio','none','none')).after(fileInput2('C','radio','none','none')).after(fileInput2('B','radio','none','none')).after(fileInput1('A','radio'));
  260. }
  261. }else if(type=="2"){//多选题
  262. if(answer_sum==2){
  263. $("#answer_opt").parent().after(fileInput2('B','checkbox','block','none')).after(fileInput1('A','checkbox'));
  264. }else if(answer_sum==3){
  265. $("#answer_opt").parent().after(fileInput2('C','checkbox','block','none'))
  266. .after(fileInput2('B','checkbox','block','none')).after(fileInput1('A','checkbox'));
  267. }else if(answer_sum==4){
  268. $("#answer_opt").parent().after(fileInput2('D','checkbox','block','block'))
  269. .after(fileInput2('C','checkbox','none','none')).after(fileInput2('B','checkbox','block','none')).after(fileInput1('A','checkbox'))
  270. }else if(answer_sum==5){
  271. $("#answer_opt").parent().after(fileInput2('E','checkbox','block','block')).after(fileInput2('D','checkbox','none','none'))
  272. .after(fileInput2('C','checkbox','none','none')).after(fileInput2('B','checkbox','block','none')).after(fileInput1('A','checkbox'));
  273. }else if(answer_sum==6){
  274. $("#answer_opt").parent().after(fileInput2('F','checkbox','block','block')).after(fileInput2('E','checkbox','none','none')).after(fileInput2('D','checkbox','none','none'))
  275. .after(fileInput1('C','checkbox','none','none')).after(fileInput2('B','checkbox','block','none')).after(fileInput1('A','checkbox'));
  276. }else if(answer_sum==7){
  277. $("#answer_opt").parent().after(fileInput2('G','checkbox','block','block')).after(fileInput2('F','checkbox','block','block')).after(fileInput2('E','checkbox','none','none'))
  278. .after(fileInput2('D','checkbox','none','none')).after(fileInput2('C','checkbox','none','none')).after(fileInput2('B','checkbox','block','none')).after(fileInput1('A','checkbox'));
  279. }
  280. }
  281. }
  282. if(type =="3" ||type =="4"){
  283. $("#option_word").attr("disabled","disabled");
  284. $("#option_picture").attr("disabled","disabled");
  285. }else{
  286. $("#option_word").removeAttr("disabled");
  287. $("#option_picture").removeAttr("disabled");
  288. }
  289. }else{
  290. /*****新增页面*******/
  291. if(opt_type==1){//文字选项
  292. if(type=="1"){//单选题
  293. $("#answer_opt").parent().after(textInput2('D','radio','block','block'))
  294. .after(textInput2('C','radio','none','none')).after(textInput2('B','radio','none','none')).after(textInput1('A','radio'))
  295. }else if(type=="2"){//多选题
  296. $("#answer_opt").parent().after(textInput2('D','checkbox','block','block'))
  297. .after(textInput2('C','checkbox','none','none')).after(textInput2('B','checkbox','none','none')).after(textInput1('A','checkbox'));
  298. }
  299. }else{//图片选项
  300. if(type=="1"){//单选题
  301. $("#answer_opt").parent().after(fileInput2('D','radio','block','block'))
  302. .after(fileInput2('C','radio','none','none')).after(fileInput2('B','radio','none','none')).after(fileInput1('A','radio'))
  303. }else if(type=="2"){//多选题
  304. $("#answer_opt").parent().after(fileInput2('D','checkbox','block','block'))
  305. .after(fileInput2('C','checkbox','none','none')).after(fileInput2('B','checkbox','none','none')).after(fileInput1('A','checkbox'));
  306. }
  307. }
  308. if(type == "4"){//情景选择题
  309. var num = $("#opt_input").val();
  310. for(var i=num;i>=1;i--){
  311. $("#answer_opt").parent().after(textInput3('radio',i,1,4))
  312. }
  313. //$("#answer_opt").parent().after(textInput3('radio',2,1)).after(textInput3('radio',1,1))
  314. }
  315. }
  316. if(type=="3"){//判断题
  317. $("#answer_opt").parent().after("<tr class='answer_con_dom'>"+
  318. "<td align='right' width='15%' ><span class='star'>*</span>选项:</td>"+
  319. "<td width='35%'>"+
  320. "<input type='radio' value='A' id='option_A' name='OPTIONS' /><label>A</label> <label>正确</label>"+
  321. "</td>"+
  322. "</tr>"+
  323. "<tr class='answer_con_dom'>"+
  324. "<td align='right' width='15%' ></td>"+
  325. "<td width='35%'>"+
  326. "<input type='radio' value='B' id='option_B' name='OPTIONS' /><label>B</label> <label>错误</label>"+
  327. "</td><td colspan='2'></td>"+
  328. "</tr>");
  329. }
  330. if(type =="3" ||type =="4"){
  331. $("#option_word").attr("checked","checked");
  332. $("#option_word").attr("disabled","disabled");
  333. $("#option_picture").attr("disabled","disabled");
  334. }else{
  335. $("#option_word").removeAttr("disabled");
  336. $("#option_picture").removeAttr("disabled");
  337. }
  338. //再添加绑定点击事件,点击新增一行
  339. $("input[name=add_btn]").on("click",function(value){
  340. var self = $(this);
  341. var val = self.parent().prev().children().eq(1).text();//当前选项值
  342. if(val == 'B'){
  343. self.parent().next().children().attr('style','display:block');
  344. }
  345. var parentTr = self.parent().parent();
  346. var cloneTr = parentTr.clone(true);
  347. parentTr.after(cloneTr);
  348. if(opt_type == 1){//文字选项
  349. parentTr.next().children().eq(1).find(".answer_id").val("");
  350. parentTr.next().children().eq(1).find(".textinput").val("");
  351. parentTr.next().children().eq(1).find("[name='OPTIONS']").attr('checked',false);
  352. }else{
  353. parentTr.next().children().eq(1).find("[name='OPTIONS']").attr('checked',false);
  354. parentTr.next().children().eq(1).find("#uploadify").val("");
  355. parentTr.next().children().eq(1).find("#file_name").val("");
  356. }
  357. var opt = parentTr.next().children().eq(1).find("[name='OPTIONS']");//克隆后改变选项值
  358. var flag = optionVal(val);
  359. opt.val(flag);
  360. opt.attr('id','option_'+flag)
  361. opt.next().text(flag)
  362. setHight();
  363. self.attr('style','display:none');
  364. self.parent().next().children().attr('style','display:none');
  365. if(flag == 'G'){
  366. parentTr.next().children().eq(2).remove();
  367. }
  368. });
  369. //绑定删除点击事件
  370. $("input[name=delete_btn]").on("click",function(){
  371. var flag = $(this).parent().prev().prev().children().eq(1).text();//当前选项值
  372. if(flag != 'C'){
  373. $(this).parent().parent().prev().children().eq(3).children().attr('style','display:block');
  374. }
  375. $(this).parent().parent().prev().children().eq(2).children().attr('style','display:block');
  376. $(this).parent().parent().remove();
  377. setHight();
  378. });
  379. //上传文件
  380. $(".uploadFile").on("click",function(){
  381. var self = $(this);
  382. var fileObj =$(this).parent().find(".uploadify")[0].files[0]; // 获取文件对象
  383. var FileController ="../../../../ws/uploadForm/FileUpDownService/indexUpLoad"; // 接收上传文件的后台地址
  384. var size = fileObj.size;
  385. var suffix = fileObj.name.split('.');
  386. var suffixName = suffix[suffix.length-1].toLowerCase();
  387. if(suffixName!="jpg"&&suffixName!="jpeg"&&suffixName!="png"&&suffixName!="gif"){
  388. top.Dialog.alert('请上传jpg、jpeg、png、gif格式!');
  389. return;
  390. }
  391. if(size == 0){
  392. top.Dialog.alert('不能上传空文件!');
  393. return;
  394. }
  395. if(fileObj){
  396. // FormData 对象
  397. var form = new FormData();
  398. form.append("file", fileObj);// 文件对象
  399. // XMLHttpRequest 对象
  400. var xhr = new XMLHttpRequest();
  401. xhr.open("post", FileController, true);
  402. xhr.onload = function () {
  403. self.prev().val(xhr.responseText);
  404. top.Dialog.alert('上传成功!')
  405. //console.log('--------'+xhr.responseText);
  406. };
  407. xhr.send(form);
  408. }else{
  409. top.Dialog.alert('请选择文件!');//弹出提示
  410. }
  411. });
  412. //删除文件
  413. $(".delFile").on("click",function(){
  414. $(this).parent().find("#uploadify").val('');
  415. $(this).parent().find("#file_name").val('');
  416. top.Dialog.alert('删除成功!')
  417. });
  418. //预览图片
  419. $(".preview").on('click',function(){
  420. var url = $(this).parent().find("#file_name").val();
  421. preview(url);
  422. })
  423. //情景选择题增加按钮
  424. $("input[name=add_btn_qj]").on("click",function(){
  425. var self = $(this);
  426. var val = self.parent().prev().children().eq(1).text();//当前选项值
  427. if(val == 'B'){
  428. self.parent().next().children().attr('style','display:block');
  429. }
  430. var parentTr = self.parent().parent();
  431. var cloneTr = parentTr.clone(true);
  432. parentTr.after(cloneTr);
  433. parentTr.next().children().eq(0).find(".answer_id").val("");
  434. parentTr.next().children().eq(0).find(".textinput").val("");
  435. parentTr.next().children().eq(0).find("[name^='OPTIONS_']").attr('checked',false);
  436. var opt = parentTr.next().children().eq(0).find("[name^='OPTIONS_']");//克隆后改变选项值
  437. var flag = optionVal(val);
  438. opt.val(flag);
  439. opt.attr('id','option_'+flag)
  440. opt.next().text(flag)
  441. setHight();
  442. self.attr('style','display:none');
  443. self.parent().next().children().attr('style','display:none');
  444. if(flag == 'G'){
  445. parentTr.next().children().eq(1).remove();
  446. parentTr.next().children().eq(1).attr('colspan','2');
  447. }
  448. });
  449. //情景选择题删除按钮
  450. $("input[name=delete_btn_qj]").on("click",function(){
  451. var flag = $(this).parent().prev().prev().children().eq(1).text();//当前选项值
  452. if(flag != 'C'){
  453. $(this).parent().parent().prev().children().eq(2).children().attr('style','display:block');
  454. }
  455. $(this).parent().parent().prev().children().eq(1).children().attr('style','display:block');//
  456. $(this).parent().parent().remove();
  457. setHight();
  458. });
  459. $("#opt_input").bind("change",function(){
  460. var val = $("#opt_input").val();
  461. if(val < 2){
  462. $("#opt_input").val(2);//情景选择题最少两个选择
  463. }
  464. createAnswerDomByType("4",0);
  465. })
  466. //情景选择题中单选多选按钮
  467. $(".opt_type_radio").bind("change",function(){
  468. /* var self = $(this);
  469. var radio_type = self.val();// 单选or多选
  470. var index = self.parent().children().eq(0).val();
  471. self.parent().children().find(".opt_type_radio").removeAttr("checked",false);
  472. self.attr("checked",true);
  473. var Tr = self.parent().parent().parent();
  474. Tr.children().eq(0).nextAll().remove();
  475. if(radio_type == 1){
  476. Tr.append(textInput4("radio",index));;
  477. }else{
  478. Tr.append(textInput4("checkbox",index));
  479. } */
  480. var self = $(this);
  481. var radio_type = self.val();// 单选or多选
  482. self.parent().children().find(".opt_type_radio").removeAttr("checked",false);
  483. self.attr("checked",true);
  484. if(radio_type == 1){
  485. var $dom = self.parent().parent().nextAll().children().find("input[name^=OPTIONS_]")
  486. for(var i=0;i<$dom.length;i++){
  487. $dom.eq(i)[0].type = "radio";
  488. }
  489. }else{
  490. var $dom = self.parent().parent().nextAll().children().find("input[name^=OPTIONS_]")
  491. for(var i=0;i<$dom.length;i++){
  492. $dom.eq(i)[0].type = "checkbox";
  493. }
  494. }
  495. setHight();
  496. });
  497. setHight();
  498. }
  499. function textInput1(char,type){
  500. var title = ""
  501. if(char == 'A'){
  502. title = "<span class='star'>*</span>选&nbsp;&nbsp;项:";
  503. }
  504. var str = "<tr class='answer_con_dom'>"+
  505. "<td align='right' width='15%' >"+title+"</td>"+
  506. "<td width='22%'>"+
  507. "<input type='"+type+"' value='"+char+"' id='option_"+char+"' name='OPTIONS' /><label>"+char+"</label>"+
  508. "<input class='validate[required] answer_content textinput' type='text' value='' maxlength='80' style='width:90%;'>"+
  509. "</td><td colspan='2'></td>"+
  510. "</tr>"
  511. return str;
  512. }
  513. function textInput2(char,type,add_type,del_type){//例:A、radio、none、block
  514. var str = "<tr class='answer_con_dom'>"+
  515. "<td align='right' width='15%' ></td>"+
  516. "<td width='22%'>"+
  517. "<input type='"+type+"' value='"+char+"' id='option_"+char+"' name='OPTIONS' /><label>"+char+"</label>"+
  518. "<input class='validate[required] answer_content textinput' type='text' value='' maxlength='80' style='width:90%;'>"+
  519. "</td><td width='4%'><input type='button' width='65%' name='add_btn' value='再添加' style='display:"+add_type+"'/></td>"+
  520. "<td><input type='button' width='35%' name='delete_btn' value='删除' style='display:"+del_type+"'/></td>"+
  521. "</tr>"
  522. return str;
  523. }
  524. //情景选择题textInput
  525. function textInput3(type,index,radio_type,sum){//index表格序号 radio_type 1:单选 2:多选 sum 个数
  526. var title = "";
  527. var radio = "<input type='radio' value='1' class='opt_type_radio' name='opt_type_"+index+"' checked='checked' /><label>单选</label>"+
  528. "<input type='radio' value='2' class='opt_type_radio' name='opt_type_"+index+"' /><label>多选</label>";
  529. if(index == 1){
  530. title = "<span class='star'>*</span>选项:";
  531. }
  532. if(radio_type == 2){
  533. radio = "<input type='radio' value='1' class='opt_type_radio' name='opt_type_"+index+"' /><label>单选</label>"+
  534. "<input type='radio' value='2' class='opt_type_radio' name='opt_type_"+index+"' checked='checked'/><label>多选</label>";
  535. }
  536. var str = "<tr >"+
  537. "<td align='right' width='15%' >"+title+"</td>"+
  538. "<td width='22%'>"+
  539. "<table class='option_table_style'>"+
  540. "<tr class='answer_con_dom'>"+
  541. "<td width='70%'>"+
  542. "<input type='hidden' value = '"+index+"'>"+
  543. radio+
  544. "</td><td colspan='2'>第"+index+"个选项答案</td>"+
  545. "</tr>";
  546. if(sum == 2){
  547. str += textInput5(type,'A',index)+textInput6(type,'B',index,'block','none');
  548. }
  549. if(sum == 3){
  550. //str += textInput5(type,'A',index)+textInput5(type,'B',index)+textInput6(type,'C',index,'block','none');
  551. str += textInput5(type,'A',index)+textInput6(type,'B',index,'none','none')+textInput6(type,'C',index,'block','block');
  552. }
  553. if(sum == 4){
  554. str += textInput5(type,'A',index)+textInput6(type,'B',index,'none','none')+textInput6(type,'C',index,'none','none')+textInput6(type,'D',index,'block','block');
  555. }
  556. if(sum == 5){
  557. str += textInput5(type,'A',index)+textInput6(type,'B',index,'none','none')+textInput6(type,'C',index,'none','none')+textInput6(type,'D',index,'none','none')+
  558. textInput6(type,'E',index,'block','block');
  559. }
  560. if(sum == 6){
  561. str += textInput5(type,'A',index)+textInput6(type,'B',index,'none','none')+textInput6(type,'C',index,'none','none')+textInput6(type,'D',index,'none','none')+
  562. textInput6(type,'E',index,'none','none')+textInput6(type,'F',index,'block','block');
  563. }
  564. if(sum == 7){
  565. str += textInput5(type,'A',index)+textInput6(type,'B',index,'none','none')+textInput6(type,'C',index,'none','none')+textInput6(type,'D',index,'none','none')+
  566. textInput6(type,'E',index,'none','none')+textInput6(type,'F',index,'none','none')+textInput6(type,'G',index,'none','block');
  567. }
  568. /* str += "<tr class='answer_con_dom'>"+
  569. "<td width='70%'>"+
  570. "<label style='margin:0px 0px 5px 5px'>单项分值:</label>"+
  571. "<input class='validate[required] textinput' type='text' name='score_option_"+index+"' value='' inputMode='numberOnly' maxlength='2' style='width:30%;text-align: center;'/>"+
  572. "</td><td colspan='2'></td>"+
  573. "</tr>"+
  574. "</table>"+
  575. "</td>"+
  576. "</tr>" */
  577. str +="</table></td><td colspan='2'></td>";
  578. return str;
  579. }
  580. //情景选择题textInput
  581. function textInput4(type,index){
  582. var str = "<tr class='answer_con_dom'>"+
  583. "<td width='70%'>"+
  584. "<input type='"+type+"' value='A' id='option_A_"+index+"' name='OPTIONS_"+index+"' /><label>A</label>"+
  585. "<input class='validate[required] answer_content textinput' type='text' value='' maxlength='80' style='width:85%;'>"+
  586. "</td><td colspan='2'></td>"+
  587. "</tr>"+
  588. "<tr class='answer_con_dom'>"+
  589. "<td width='70%'>"+
  590. "<input type='"+type+"' value='B' id='option_B_"+index+"' name='OPTIONS_"+index+"' /><label>B</label>"+
  591. "<input class='validate[required] answer_content textinput' type='text' value='' maxlength='80' style='width:85%;'>"+
  592. "</td><td colspan='2'></td>"+
  593. "</tr>"+
  594. "<tr class='answer_con_dom'>"+
  595. "<td width='70%'>"+
  596. "<input type='"+type+"' value='C' id='option_C_"+index+"' name='OPTIONS_"+index+"' /><label>C</label>"+
  597. "<input class='validate[required] answer_content textinput' type='text' value='' maxlength='80' style='width:85%;'>"+
  598. "</td><td width='4%'><input type='button' width='65%' name='add_btn_qj' value='再添加' style='display:none'/></td>"+
  599. "<td><input type='button' width='35%' name='delete_btn_qj' value='删除' style='display:none'/></td>"+
  600. "</tr>"+
  601. "<tr class='answer_con_dom'>"+
  602. "<td width='70%'>"+
  603. "<input type='"+type+"' value='D' id='option_D_"+index+"' name='OPTIONS_"+index+"' /><label>D</label>"+
  604. "<input class='validate[required] answer_content textinput' type='text' value='' maxlength='80' style='width:85%;'>"+
  605. "</td><td width='4%'><input type='button' width='65%' name='add_btn_qj' value='再添加' style='display:block'/></td>"+
  606. "<td><input type='button' width='35%' name='delete_btn_qj' value='删除' style='display:block'/></td>"+
  607. "</tr>";
  608. /* "<tr class='answer_con_dom'>"+
  609. "<td width='70%'>"+
  610. "<label style='margin:0px 0px 5px 5px'>单项分值:</label>"+
  611. "<input class='validate[required] textinput' type='text' name='score_option_"+index+"' value='' inputMode='numberOnly' maxlength='2' style='width:30%;text-align: center;'/>"+
  612. "</td><td colspan='2'></td>"+
  613. "</tr>" */
  614. return str;
  615. }
  616. function textInput5(type,char,index){
  617. var str = "<tr class='answer_con_dom'>"+
  618. "<td width='70%'>"+
  619. "<input type='"+type+"' value='"+char+"' id='option_"+char+"_"+index+"' name='OPTIONS_"+index+"' /><label>"+char+"</label>"+
  620. "<input class='answer_id' type='hidden' value='' maxlength='80' style='width:85%;'>"+
  621. "<input class='validate[required] answer_content textinput' type='text' value='' maxlength='80' style='width:85%;'>"+
  622. "</td><td colspan='2'></td>"+
  623. "</tr>";
  624. return str;
  625. }
  626. function textInput6(type,char,index,add_type,del_type){
  627. var str = "<tr class='answer_con_dom'>"+
  628. "<td width='70%'>"+
  629. "<input type='"+type+"' value='"+char+"' id='option_"+char+"_"+index+"' name='OPTIONS_"+index+"' /><label>"+char+"</label>"+
  630. "<input class='answer_id' type='hidden' value='' maxlength='80' style='width:85%;'>"+
  631. "<input class='validate[required] answer_content textinput' type='text' value='' maxlength='80' style='width:85%;'>"+
  632. "</td><td width='4%'><input type='button' width='65%' name='add_btn_qj' value='再添加' style='display:"+add_type+"'/></td>"+
  633. "<td><input type='button' width='35%' name='delete_btn_qj' value='删除' style='display:"+del_type+"'/></td>"+
  634. "</tr>"
  635. return str;
  636. }
  637. function fileInput1(char,type){
  638. var title = ""
  639. if(char == 'A'){
  640. title = "<span class='star'>*</span>选&nbsp;&nbsp;项:";
  641. }
  642. var str = "<tr class='answer_con_dom'>"+
  643. "<td align='right' width='15%' >"+title+"</td>"+
  644. "<td width='22%' colspan='2'>"+
  645. "<input type='"+type+"' value='"+char+"' id='option_"+char+"' name='OPTIONS' /><label>"+char+"</label>"+
  646. "<input type='file' name='uploadify' class='uploadify' style='margin:0 10px 0 10px'/>"+
  647. "<input type='hidden' id='file_name' />"+
  648. "<input type='button' value='上传' style='margin-right:10px' class='uploadFile'/>"+
  649. "<input type='button' value='重置' style='margin-right:10px' class='delFile'/>"+
  650. "<input type='button' value='预览' class='preview'/>"+
  651. "</td><td colspan='2'></td>"+
  652. "</tr>"
  653. return str;
  654. }
  655. function fileInput2(char,type,add_type,del_type){
  656. var str = "<tr class='answer_con_dom'>"+
  657. "<td align='right' width='15%' ></td>"+
  658. "<td width='22%' colspan='2'>"+
  659. "<input type='"+type+"' value='"+char+"' id='option_"+char+"' name='OPTIONS' /><label>"+char+"</label>"+
  660. "<input type='file' name='uploadify' class='uploadify' style='margin:0 10px 0 10px' />"+
  661. "<input type='hidden' id='file_name' />"+
  662. "<input type='button' value='上传' style='margin-right:10px' class='uploadFile'/>"+
  663. "<input type='button' value='重置' style='margin-right:10px' class='delFile'/>"+
  664. "<input type='button' value='预览' class='preview'/>"+
  665. "</td><td width='4%'><input type='button' width='65%' name='add_btn' value='再添加' style='display:"+add_type+"'/></td>"+
  666. "<td><input type='button' width='35%' name='delete_btn' value='删除' style='display:"+del_type+"'/></td>"+
  667. "</tr>"
  668. return str;
  669. }
  670. //选项值
  671. function optionVal(opt){
  672. var word = ['A','B','C','D','E','F','G'];
  673. for(var i=0;i<word.length;i++){
  674. if(word[i]==opt){
  675. return word[i+1];
  676. break;
  677. }
  678. }
  679. }
  680. //根据答案选择选项,answer格式为"A,D"、情景选择题格式为"A,D|A,B"
  681. function checkedByAnswer(answer,type){
  682. if(type == 4){
  683. var str = answer.split("|");
  684. for(var i=1;i<=str.length;i++){
  685. var val = str[i-1].split(",");
  686. for(var j=0;j<val.length;j++){
  687. if(val[j].indexOf("A")>-1){
  688. $("input[name=OPTIONS_"+i+"]").eq(0).attr("checked","checked");
  689. }
  690. if(val[j].indexOf("B")>-1){
  691. $("input[name=OPTIONS_"+i+"]").eq(1).attr("checked","checked");
  692. }
  693. if(val[j].indexOf("C")>-1){
  694. $("input[name=OPTIONS_"+i+"]").eq(2).attr("checked","checked");
  695. }
  696. if(val[j].indexOf("D")>-1){
  697. $("input[name=OPTIONS_"+i+"]").eq(3).attr("checked","checked");
  698. }
  699. if(val[j].indexOf("E")>-1){
  700. $("input[name=OPTIONS_"+i+"]").eq(4).attr("checked","checked");
  701. }
  702. if(val[j].indexOf("F")>-1){
  703. $("input[name=OPTIONS_"+i+"]").eq(5).attr("checked","checked");
  704. }
  705. if(val[j].indexOf("G")>-1){
  706. $("input[name=OPTIONS_"+i+"]").eq(6).attr("checked","checked");
  707. }
  708. }
  709. }
  710. }else{
  711. if(answer.indexOf("A")>-1){
  712. $("input[name=OPTIONS]").eq(0).attr("checked","checked");
  713. }
  714. if(answer.indexOf("B")>-1){
  715. $("input[name=OPTIONS]").eq(1).attr("checked","checked");
  716. }
  717. if(answer.indexOf("C")>-1){
  718. $("input[name=OPTIONS]").eq(2).attr("checked","checked");
  719. }
  720. if(answer.indexOf("D")>-1){
  721. $("input[name=OPTIONS]").eq(3).attr("checked","checked");
  722. }
  723. if(answer.indexOf("E")>-1){
  724. $("input[name=OPTIONS]").eq(4).attr("checked","checked");
  725. }
  726. if(answer.indexOf("F")>-1){
  727. $("input[name=OPTIONS]").eq(5).attr("checked","checked");
  728. }
  729. if(answer.indexOf("G")>-1){
  730. $("input[name=OPTIONS]").eq(6).attr("checked","checked");
  731. }
  732. }
  733. }
  734. /***图片预览***/
  735. function preview(url){
  736. var diag = new top.Dialog();
  737. var src_url = url
  738. diag.Title = '图片预览';
  739. diag.URL = $.pathname() + '/page/business/exercise/examineManagement/previewPicture.jsp?src_url='+src_url ;
  740. diag.Width = 400; //宽度
  741. diag.Height = 300; //高度
  742. diag.show();
  743. }
  744. //获得当前系统时间:年月日时分秒
  745. function getDateTime(){
  746. var s="";
  747. var d = new Date();
  748. var vYear = d.getFullYear();
  749. var vMon = d.getMonth() + 1;
  750. var vDay = d.getDate();
  751. var h = d.getHours();
  752. var m = d.getMinutes();
  753. var se = d.getSeconds();
  754. s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m)+":"+(se<10 ? "0" +se : se);
  755. return s;
  756. }
  757. function changeQuestionType(){
  758. var question_type = $("#QUESTION_TYPE_603").val();
  759. if(question_type==""){
  760. question_type ="1";
  761. }
  762. createAnswerDomByType(question_type,0)
  763. }
  764. function radio_click(type){
  765. var question_type = $("#QUESTION_TYPE_603").val();
  766. if(question_type==''){
  767. question_type = '1';
  768. }
  769. opt_type = type;
  770. createAnswerDomByType(question_type,0)
  771. }
  772. function radio_click_qj(index){
  773. }
  774. function checkApplicableType(applicable_type){
  775. if(applicable_type.indexOf("1")>-1){
  776. $("[name='applicable_type']").eq(0).attr("checked","checked");
  777. }
  778. if(applicable_type.indexOf("2")>-1){
  779. $("[name='applicable_type']").eq(1).attr("checked","checked");
  780. }
  781. if(applicable_type.indexOf("3")>-1){
  782. $("[name='applicable_type']").eq(2).attr("checked","checked");
  783. }
  784. if(applicable_type.indexOf("4")>-1){
  785. $("[name='applicable_type']").eq(3).attr("checked","checked");
  786. }
  787. }
  788. function answerType(answer_type){
  789. if(answer_type=="1"){
  790. $("[name='opt_type']").eq(0).attr("checked","checked");
  791. opt_type = 1;
  792. }
  793. if(answer_type=="2"){
  794. $("[name='opt_type']").eq(1).attr("checked","checked");
  795. opt_type = 2;
  796. }
  797. }
  798. </script>
  799. </head>
  800. <body class="bd" align="center" >
  801. <div id="formContent" class="d_ground">
  802. <div class="title" align="center"><a href="javascript:;"><img id='goback' class="back" align="left" alt="返回" src="/nwyj/images/temp/back.png" ></img></a><font class="title_font" id="titleShow"></font></div>
  803. <form id="editForm">
  804. <input name="classid" id="603Class" value="603" type="hidden" />
  805. <input type="hidden" name="FD_OBJECTID603" value=""/>
  806. <input name="INPUT_NAME_603" id="INPUT_NAME_603" value="0" type="hidden"><!-- 出题人姓名 -->
  807. <input name="INPUT_NAME_ID_603" id="INPUT_NAME_ID_603" type="hidden"><!-- 出题人id -->
  808. <input name="INPUT_TIME_603" id="INPUT_TIME_603" type="hidden"><!-- 出题时间 -->
  809. <input name="INPUT_PERSON_UNIT_603" id="INPUT_PERSON_UNIT_603" type="hidden"><!-- 出题人所在单位 -->
  810. <input name="INPUT_PERSON_DEPT_603" id="INPUT_PERSON_DEPT_603" type="hidden"><!-- 出题人所在部门-->
  811. <input name="QUESTION_ANSWER_603" id="QUESTION_ANSWER_603" type="hidden"><!-- 出题人所在部门-->
  812. <input name="APPLICABLE_OBJECT_603" id="APPLICABLE_OBJECT_603" type="hidden"><!-- 适用对象 -->
  813. <input name="ANSWER_TYPE_603" id="ANSWER_TYPE_603" type="hidden"><!-- 答案类型 -->
  814. <input name="ANSWER_OPTION_603" id="ANSWER_OPTION_603" type="hidden"><!-- 情景选择题答案按钮选项 -->
  815. <input name="QUESTION_VERSION_ID_603" id="QUESTION_VERSION_ID_603" type="hidden"><!-- 版本号-->
  816. <!-- 保存和重置 -->
  817. <div class="button_jl">
  818. <input value="保存后继续新增" type="button"id="saveAndAgain" />&nbsp;&nbsp;
  819. <input value="保存" type="button"id="save" />&nbsp;&nbsp;
  820. <input value="重置" type="button" onclick="formReset()"/>&nbsp;&nbsp;
  821. <!-- <input value="放弃" type="button"id="giveUp" />&nbsp;&nbsp; -->
  822. </div><br />
  823. <fieldset class="fieldset">
  824. <legend class="legend">基本信息:</legend>
  825. <table class="add_table_style" >
  826. <tr>
  827. <td align="right" width="15%" ><span class="star">*</span>内容类别:</td>
  828. <td width="35%"><select class="validate[required] selectWidth " swidth="69%" id="QUESTION_CLASSIFY_603" name="QUESTION_CLASSIFY_603" prompt="请选择" boxHeight="300">
  829. </select></td>
  830. </tr>
  831. <tr>
  832. <td align="right" width="15%" ><span class="star">*</span>题目类型:</td>
  833. <td width="35%"><select class="validate[required] selectWidth " swidth="69%" id="QUESTION_TYPE_603" name="QUESTION_TYPE_603" prompt="请选择" onchange="changeQuestionType();" >
  834. </select></td>
  835. </tr>
  836. <tr>
  837. <td align="right" width="15%"><!-- <span class="star">*</span> -->内容来源:</td>
  838. <td width="35%"><input name="EXAMINATION_CONTENT_603" id="EXAMINATION_CONTENT_603" type="text" value="" maxlength="300" style="width:460px;"></td>
  839. </tr>
  840. <tr>
  841. <td align="right" width="15%" ><span class="star">*</span>题目名称:</td>
  842. <td width="35%"><!-- <input name="QUESTION_NAME_603" class="validate[required]" id="QUESTION_NAME_603" type="text" value="" maxlength="200" style="width:78%;height:40px"> -->
  843. <textarea rows="5" cols="40" style="width:460px" name="QUESTION_NAME_603" class="validate[required]" id="QUESTION_NAME_603" maxlength="300"></textarea>
  844. </td>
  845. </tr>
  846. <tr >
  847. <td align="right" width="15%" ><span class="star">*</span>适用对象:</td>
  848. <td width="35%">
  849. <input type="checkbox" value="1" id="option_1" name="applicable_type" /><label>Ⅰ类</label>
  850. <input type="checkbox" value="2" id="option_2" name="applicable_type" /><label>Ⅱ类</label>
  851. <input type="checkbox" value="3" id="option_3" name="applicable_type" /><label>Ⅲ类</label>
  852. <input type="checkbox" value="4" id="option_4" name="applicable_type" /><label>Ⅳ类</label>
  853. </td>
  854. </tr>
  855. <tr >
  856. <td align="right" width="15%" ><span class="star">*</span>选项类型:</td>
  857. <td width="35%">
  858. <input type='radio' value='1' id='option_word' name='opt_type' checked="checked" onclick="radio_click(1)" /><label>文字</label>
  859. <input type='radio' value='2' id='option_picture' name='opt_type' onclick="radio_click(2)"/><label>图片</label>
  860. </td>
  861. </tr>
  862. <tr style="display: none;">
  863. <td align="right" width="15%" ></td>
  864. <td width="35%" id="answer_opt">
  865. </td><!-- 用于情景选择题答案选项 -->
  866. </tr>
  867. <!-- <tr>
  868. <td align="right" width="15%" ><span class="star">*</span>分&nbsp;&nbsp;值:</td>
  869. <td width="35%"><select class="validate[required] selectWidth " swidth="78%" id="QUESTION_SCORE_603" name="QUESTION_SCORE_603" prompt="请选择" ></select>
  870. <input type='text' class="validate[required]" id="QUESTION_SCORE_603" name="QUESTION_SCORE_603" inputMode='numberOnly' maxlength='2' style="width:20%;text-align: center;"/><label> 分</label>
  871. </td>
  872. </tr> -->
  873. </table>
  874. </fieldset>
  875. </form>
  876. <form id="editFormSub">
  877. <input name="classid" id="604Class" value="604" type="hidden" />
  878. <input type="hidden" name="FD_OBJECTID604" id="FD_OBJECTID604" value=""/>
  879. <input name="OPTION_604" id="OPTION_604" value="0" type="hidden"/><!-- 选项 -->
  880. <input name="QUESTION_ID_604" id="QUESTION_ID_604" type="hidden"/><!-- 主表主键 -->
  881. <input name="OPTION_CONTENT_604" id="OPTION_CONTENT_604" type="hidden"/><!-- 选项内容-->
  882. <input name="OPTION_INDEX_604" id="OPTION_INDEX_604" type="hidden"/><!-- 选项位置-->
  883. </form>
  884. </div>
  885. </body>