FIRSTCOMMIT

master
20918 1 year ago
parent 88f3492544
commit 15090ad6c2

@ -1,11 +1,13 @@
package com.ruoyi.web.controller.system; package com.ruoyi.web.controller.system;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.TdQuestion; import com.ruoyi.system.domain.TdQuestion;
import com.ruoyi.system.service.ITdQuestionService; import com.ruoyi.system.service.ITdQuestionService;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -28,11 +30,13 @@ public class TdExamController extends BaseController{
@RequiresPermissions("system:exam:view") @RequiresPermissions("system:exam:view")
@GetMapping() @GetMapping()
public String exam() public String index(ModelMap mmap){
{ SysUser user = getSysUser();
return prefix + "/exam"; mmap.put("user", user);
}
return prefix + "/index";
}
/** /**
* *
*/ */
@ -47,6 +51,13 @@ public class TdExamController extends BaseController{
return getDataTable(list); return getDataTable(list);
} }
/**
* 访exam
*/
@RequestMapping("/exam")
public String index(){
return prefix + "/exam";
}

@ -57,7 +57,7 @@
<td class="table" align="left"><b>选择相关考题</b><hr /></td> <td class="table" align="left"><b>选择相关考题</b><hr /></td>
</tr> </tr>
<tr> <tr>
<td class="table" align="left"><b>人员姓名:</b>admin<hr/></td> <td class="table" align="left"><b>人员姓名:</b> admin <hr/></td>
<td class="table" align="left"><b>单位:</b>admin<hr/></td> <td class="table" align="left"><b>单位:</b>admin<hr/></td>
<td class="table" align="left"> <td class="table" align="left">
<select name="TYPEID" th:with="type=${@dict.getType('td_question_type')}"> <select name="TYPEID" th:with="type=${@dict.getType('td_question_type')}">
@ -71,7 +71,7 @@
<p align="center" class="unnamed1">答题过程不能中断!不能作弊和抄袭,</p> <p align="center" class="unnamed1">答题过程不能中断!不能作弊和抄袭,</p>
<p align="center" class="unnamed1">考试时间为45分钟到考试结束时间没有交卷的系统将强制交卷</p> <p align="center" class="unnamed1">考试时间为45分钟到考试结束时间没有交卷的系统将强制交卷</p>
<p align="center"> <p align="center">
<input type="button" name="button1" value=" 开始答卷" class="box_button" onclick="check('addTryBook')" <input type="button" name="button1" value=" 开始答卷" class="box_button" onclick="check()"
/> />
</p></td> </p></td>
</tr> </tr>
@ -84,18 +84,10 @@
</div> </div>
</div> </div>
<script th:inline="javascript"> <script th:inline="javascript">
function check(operate) { function check() {
debugger debugger
form1.operate.value = operate; window.location.href = 'exam';
if (operate == "addTryBook") {
if (form1.TYPEID.value=='') {
alert("请选择相关考题!");
return false;
}
// form1.action = "/zhyw/smsj/TryBook.jsp";
}
// form1.button1.disabled=true;
// form1.submit();
} }
</script> </script>
</body> </body>

Loading…
Cancel
Save