parent
ddf19bc4db
commit
34b871aadc
@ -0,0 +1,50 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.system.domain.TdQuestion;
|
||||
import com.ruoyi.system.service.ITdQuestionService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 保密考试
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/exam")
|
||||
public class TdExamController extends BaseController{
|
||||
private String prefix = "system/exam";
|
||||
|
||||
@Autowired
|
||||
private ITdQuestionService tdQuestionService;
|
||||
|
||||
@RequiresPermissions("system:exam:view")
|
||||
@GetMapping()
|
||||
public String exam()
|
||||
{
|
||||
return prefix + "/exam";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询题库列表返回
|
||||
*/
|
||||
@RequiresPermissions("system:exam:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TdQuestion tdQuestion)
|
||||
{
|
||||
startPage();
|
||||
List<TdQuestion> list = tdQuestionService.selectTdQuestionList(tdQuestion);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('保密考试')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>题库类型:</label>
|
||||
<select name="TYPEID" th:with="type=${@dict.getType('td_question_type')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
debugger;
|
||||
var editFlag = [[${@permission.hasPermi('system:question:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:question:remove')}]];
|
||||
var TYPEIDDatas = [[${@dict.getType('td_question_type')}]];
|
||||
var prefix = ctx + "system/question";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "保密考试",
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue