You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

80 lines
3.3 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-04-23 15:50
  5. * 描 述:问卷管理
  6. */
  7. var refreshGirdData;
  8. var VID = request("VID");
  9. var EmpNo = request("EmpNo");
  10. var LessonNo = request("LessonNo");
  11. var bootstrap = function ($, learun) {
  12. "use strict";
  13. var page = {
  14. init: function () {
  15. $('.warpper').lrscroll();
  16. page.bind();
  17. },
  18. bind: function () {
  19. $('.shenBtn').click(function () {
  20. $('#AskPaper').trigger("validate");
  21. });
  22. //单选框
  23. $('.shenInputBox').on('click',
  24. '.inputRadio',
  25. function () {
  26. if (!$(this).hasClass('active')) {
  27. $(this).addClass('active').parents('.shenInputBox').find('.inputRadio').not($(this))
  28. .removeClass('active');
  29. judgeRideo($(this));
  30. }
  31. });
  32. //多选框
  33. $('.inputCheck').click(function () {
  34. if ($(this).hasClass('active')) {
  35. $(this).removeClass('active');
  36. } else {
  37. $(this).addClass('active');
  38. }
  39. judgeRideo($(this));
  40. });
  41. //是否为其他选项判断
  42. function judgeRideo(obj) {
  43. var parents = obj.parents('.signSec2Box');
  44. var inputs = parents.find('.shenInput3');
  45. if (parents.find("i[hasinput='yes']").hasClass('active')) {
  46. inputs.css({ display: 'block' });
  47. } else {
  48. inputs.css({ display: 'none' });
  49. }
  50. }
  51. $('#AskPaper').validator({
  52. timely: 2,
  53. theme: 'yellow_right_effect',
  54. valid: function (form) {
  55. learun.layerConfirm('是否确认提交?', function (res) {
  56. var answerlist = new Array();
  57. var strStuNo = $("#StuNo").val();
  58. var strStuName = $("#StuName").val();
  59. $(form).find("input.xuanze:checked").each(function (index, element) {
  60. var itemvalue = { QID: $(this).attr("qid"), IID: $(this).attr("id"), UText: "", UID: strStuNo, UName:strStuName};
  61. if ($(this).attr("hasinput")=="yes") {
  62. itemvalue.UText = $("#" + $(this).attr("id") + "Other").val();
  63. }
  64. answerlist.push(itemvalue);
  65. });
  66. if (res) {
  67. learun.postForm(top.$.rootUrl + '/EvaluationTeach/Eval_Main/StudentSubmitForm', { answerlist: JSON.stringify(answerlist), VID: VID, LessonNo: LessonNo, EmpNo: EmpNo, "__RequestVerificationToken": $.lrToken }, function () {
  68. learun.frameTab.parentIframe().refreshGirdData();
  69. learun.frameTab.close("EvaluationTeachpaper" + VID);
  70. });
  71. }
  72. });
  73. }
  74. });
  75. }
  76. };
  77. page.init();
  78. }