TestQuestionAdd.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. @model EMISOnline.ViewModel.ExamView.QuestionSettingView
  2. @using EMISOnline.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "ExamAdd";
  6. }
  7. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;
  8. overflow: auto;">
  9. @Html.Position()
  10. <div class="p_SearchTitle">
  11. </div>
  12. <div class="p_title">
  13. <div style="float: left; margin-left: 10px; color: #333; line-height: 35px; font-size: 12px;">
  14. 题库信息</div>
  15. <div style="margin-right: 10px; float: right; line-height: 30px; font-size: 12px;">
  16. @Html.Button(new ButtonOptions() { ID = "btnSave", Text = "保 存" })
  17. </div>
  18. </div>
  19. @using (Ajax.BeginForm(new AjaxOptions
  20. {
  21. OnSuccess = "EMISFunction.FormSuccess",
  22. OnBegin = "EMISFunction.FormSubmit",
  23. OnComplete = "EMISFunction.FormComplete",
  24. }))
  25. {
  26. @Html.Hidden("question_provid_answer")
  27. @Html.Hidden("ipt_entry")
  28. @Html.Hidden("txt_libary")
  29. @Html.HiddenFor(x=>x.test_question_Id)
  30. <div class="search_list">
  31. <table cellpadding="0" cellspacing="0" id="Coursematerialtable">
  32. <tr>
  33. <th>@Html.LabelFor(x => x.base_question_type_id):
  34. </th>
  35. <td>
  36. @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SubjectMgr/GetQuestionType"), SelectedValue=Model.base_question_type_id, OnChange = "showQuestionOption", TextField = "Name", ValueField = "base_question_type_id", ID = "QuestionType", Name = "QuestionType" }, new Dictionary<string, string> { { "data-condition", "dgList" } })
  37. </td>
  38. </tr>
  39. <tr>
  40. <th>@Html.LabelFor(x => x.content):
  41. </th>
  42. <td>
  43. 填写答案的地方请用“【__________】”表示(限字数为1000)
  44. @Html.TextAreaFor(x => x.content, new Dictionary<string, object> { { "style", "width:80%" } })
  45. </td>
  46. </tr>
  47. <tr>
  48. <th>@Html.LabelFor(x => x.question_file_id):
  49. </th>
  50. <td>
  51. <a href="javascript:void(0);" id="btnPackerLib">选择</a>
  52. </td>
  53. </tr>
  54. <tr>
  55. <th>@Html.LabelFor(x => x.answers):
  56. </th>
  57. <td class="trOption">
  58. <div id="divSingle" style="display: none">
  59. <table class="gridview" cellspacing="0" rules="all" border="0" id="tbSingle" style="border-width: 0px;
  60. border-collapse: collapse; text-align: center">
  61. <tr align="center">
  62. <th scope="col">
  63. 选项内容
  64. </th>
  65. <th align="center" scope="col" style="width: 80px;">
  66. 正确答案
  67. </th>
  68. <th scope="col" style="width: 160px; text-align: center;">
  69. 选项图片
  70. </th>
  71. <th scope="col" style="width: 40px;">
  72. 操作
  73. </th>
  74. </tr>
  75. <tr id="trSingle">
  76. <td align="right" colspan="4">
  77. <input type="button" id="btnSingleAdd" value="新增答案" class="button70" onclick="AddSingleRowHandler()" />
  78. </td>
  79. </tr>
  80. </table>
  81. </div>
  82. <div id="divMultiple" style="display: none">
  83. <table class="gridview" cellspacing="0" rules="all" border="0" id="tbMultiple" style="border-width: 0px;
  84. border-collapse: collapse; text-align: center;">
  85. <tr align="center">
  86. <th scope="col">
  87. 选项内容
  88. </th>
  89. <th align="center" scope="col" style="width: 80px;">
  90. 正确答案
  91. </th>
  92. <th scope="col" style="width: 160px;">
  93. 选项图片
  94. </th>
  95. <th scope="col" style="width: 40px;">
  96. 操作
  97. </th>
  98. </tr>
  99. <tr id="trMultiple">
  100. <td align="right" colspan="4">
  101. <input type="button" id="Button1" value="新增答案" class="button70" onclick="AddMultipleRowHandler()" />
  102. </td>
  103. </tr>
  104. </table>
  105. </div>
  106. <div id="divFill" style="display: none">
  107. <table class="gridview" cellspacing="0" rules="all" border="0" id="tbFill" style="border-width: 0px;
  108. border-collapse: collapse;">
  109. <tr align="center">
  110. <th style="width: 300px;">
  111. 选项内容
  112. </th>
  113. <th style="width: 160px;">
  114. 选项图片
  115. </th>
  116. <th style="width: 40px;">
  117. 操作
  118. </th>
  119. </tr>
  120. <tr id="trFill">
  121. <td align="right" colspan="3">
  122. <input type="button" id="btnFill" value="新增答案" class="button70" onclick="AddFillRowHandler()" />
  123. </td>
  124. </tr>
  125. </table>
  126. </div>
  127. <div id="divJudge" style="display: none">
  128. <input type="radio" name="rdJudgeOption" value="正确" checked="checked" />正确
  129. <input type="radio" name="rdJudgeOption" value="错误" />错误
  130. </div>
  131. <div id="divShort" style="display: none">
  132. <input id="iptAnswerID" type="hidden" />
  133. <textarea rows="5" name="txtShortAnswer" class="input" style="width: 81.2%; height: 100px;"></textarea>
  134. </div>
  135. </td>
  136. </tr>
  137. <tr>
  138. <th>@Html.LabelFor(x => x.difficulty_degree):
  139. </th>
  140. <td>
  141. @Html.DropdownListFor(q => q.difficulty_degree, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SubjectMgr/GetDrpDifficulty"), TextField = "name", ValueField = "name", ID = "difficulty_degree", Name = "difficulty_degree" }, new Dictionary<string, string> { { "data-condition", "dgList" } })
  142. </td>
  143. </tr>
  144. <tr>
  145. <th>@Html.LabelFor(x => x.score):
  146. </th>
  147. <td>
  148. @Html.TextBoxFor(model => model.score, new TextBoxOptions() { TextBoxType = TextBoxType.Normal })
  149. </td>
  150. </tr>
  151. <tr>
  152. <th>@Html.LabelFor(x => x.is_vaild):
  153. </th>
  154. <td>
  155. @Html.RadioButtonFor(model => model.is_vaild, "true", new { @value = "true", @checked = "checked", })<label>启用</label>
  156. @Html.RadioButtonFor(model => model.is_vaild, "false", new { @value = "false", })<label>停用</label>
  157. </td>
  158. </tr>
  159. <tr>
  160. <th>@Html.LabelFor(x => x.note):
  161. </th>
  162. <td>
  163. @Html.TextAreaFor(x => x.note, new Dictionary<string, object> { { "style", "width:80%" } })
  164. </td>
  165. </tr>
  166. </table>
  167. </div>
  168. }
  169. <div id="optionTpl">
  170. <table style="display: none">
  171. <tr align="center" id="trSingleTpl">
  172. <td scope="col">
  173. <textarea rows="4" name="txtContext" class="input" style="width: 300px;"></textarea>
  174. </td>
  175. <td align="center" scope="col" style="width: 80px;">
  176. <input type="radio" id="rdIsRight" name="rdIsRight" />
  177. </td>
  178. <td scope="col">
  179. <a href="javascript:void(0);" onclick="UploadFileBefore(this);" id="singleUpload"
  180. class="singleUpload">上传</a>
  181. <input id="iptSingleFile" type="hidden" />
  182. </td>
  183. <td scope="col" style="width: 40px;">
  184. <input id="iptAnswerID" type="hidden" />
  185. <a href="javascript:void(0);" onclick="delRow(this)">删除</a>
  186. </td>
  187. </tr>
  188. </table>
  189. <table style="display: none">
  190. <tr align="center" id="trMultipleTpl">
  191. <td scope="col">
  192. <textarea rows="4" name="txtContext" class="input" style="width: 300px;"></textarea>
  193. </td>
  194. <td align="center" scope="col" style="width: 80px;">
  195. <input type="checkbox" id="ckbIsRight" />
  196. </td>
  197. <td scope="col">
  198. <a href="javascript:void(0);" onclick="UploadFileBefore(this);" id="singleUpload"
  199. class="singleUpload">上传</a>
  200. <input id="iptSingleFile" type="hidden" />
  201. </td>
  202. <td scope="col" style="width: 40px;">
  203. <input id="iptAnswerID" type="hidden" />
  204. <a href="javascript:void(0);" onclick="delRow(this)">删除</a>
  205. </td>
  206. </tr>
  207. </table>
  208. <table style="display: none">
  209. <tr align="center" id="trFillTpl">
  210. <td scope="col">
  211. <textarea rows="2" name="txtContext" class="input" style="width: 300px;"></textarea>
  212. </td>
  213. <td scope="col">
  214. <a href="javascript:void(0);" onclick="UploadFileBefore(this);" id="fillUpload" class="singleUpload">
  215. 上传</a>
  216. <input id="iptSingleFile" type="hidden" />
  217. </td>
  218. <td scope="col" style="width: 40px;">
  219. <input id="iptAnswerID" type="hidden" />
  220. <a href="javascript:void(0);" onclick="delRow(this)">删除</a>
  221. </td>
  222. </tr>
  223. </table>
  224. </div>
  225. </div>
  226. <div id="dialog">
  227. </div>
  228. @section scripts{
  229. <script src="~/Scripts/Bowin.Control.Core/Controls/Selector.js" type="text/javascript"></script>
  230. <script src="~/Scripts/Examinee/page.question.js" type="text/javascript"></script>
  231. <script type="text/jscript">
  232. $(function () {
  233. var entryJS = @Html.Raw(ViewBag.entryJS);
  234. if(entryJS!=undefined){
  235. var queLogic= new question(entryJS);
  236. queLogic.setEntry();
  237. }
  238. })
  239. </script>
  240. }