From 41b21c0f8d9ce7e0ff91d1faf954eb3fc32a5bd1 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Thu, 4 Jul 2024 10:51:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=80=83=E8=AF=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/exam/UserExamController.java | 23 ++-- .../templates/system/elExam/exam/exam.html | 10 +- .../system/elExam/userExam/userExam.html | 104 ++++++++++++++++++ 3 files changed, 126 insertions(+), 11 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/system/elExam/userExam/userExam.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/UserExamController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/UserExamController.java index 1070617..3fe400e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/UserExamController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/UserExamController.java @@ -5,6 +5,8 @@ import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.paper.dto.response.PaperListRespDTO; +import com.ruoyi.system.domain.repo.ElRepo; import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO; import com.ruoyi.system.domain.userexam.dto.response.UserExamRespDTO; import com.ruoyi.web.controller.manager.UserExamManager; @@ -12,10 +14,8 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.shiro.authz.annotation.RequiresPermissions; 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 org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; @@ -40,9 +40,11 @@ public class UserExamController extends BaseController { private String prefix = "system/elExam/userExam"; + @ApiOperation("考试详情") - @GetMapping() - public String userExam() { + @GetMapping("/toExam/{id}") + public String toExam(@PathVariable("id") String id, ModelMap mmap) { + mmap.put("examId", id); return prefix + "/userExam"; } @@ -57,10 +59,11 @@ public class UserExamController extends BaseController { } @ApiOperation("详情") - @GetMapping("/detail") - @ResponseBody - public AjaxResult detail(String examId,Long userId) { - return success(userExamManager.detail(examId,userId)); + @GetMapping("/detail/{examId}/{userId}") + public String detail(@PathVariable("examId") String examId, @PathVariable("userId") Long userId, ModelMap mmap) { + List list = userExamManager.detail(examId, userId); + mmap.put("list", list); + return prefix + "/userExam"; } diff --git a/ruoyi-admin/src/main/resources/templates/system/elExam/exam/exam.html b/ruoyi-admin/src/main/resources/templates/system/elExam/exam/exam.html index c45150b..ffc02d8 100644 --- a/ruoyi-admin/src/main/resources/templates/system/elExam/exam/exam.html +++ b/ruoyi-admin/src/main/resources/templates/system/elExam/exam/exam.html @@ -58,6 +58,7 @@ var types = [[${@dict.getType('sys_open_type')}]]; var datas = [[${@dict.getType('sys_exam_state')}]]; var prefix = ctx + "system/newExam"; + var prefixUser = ctx + "system/userExam"; $(function() { var options = { uniqueId: "id", @@ -121,7 +122,8 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); + actions.push('详细 '); + actions.push('编辑 '); actions.push('删除'); return actions.join(''); } @@ -129,6 +131,12 @@ }; $.table.init(options); }); + + /*资产列表-详细*/ + function detail(id) { + var url = prefixUser + '/toExam/' + id; + $.modal.openTab("考试人员", url); + } diff --git a/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/userExam.html b/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/userExam.html new file mode 100644 index 0000000..74db87e --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/userExam.html @@ -0,0 +1,104 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ + + +
+
+
+
+
+ + + +