From 1311d36649e5ab0e24e4dc346183f6852717097b Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Tue, 9 Jul 2024 16:10:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/elExam/onlineExam/toExam.html | 2 +- .../system/elExam/userExam/view.html | 107 +++++++++--------- 2 files changed, 53 insertions(+), 56 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/elExam/onlineExam/toExam.html b/ruoyi-admin/src/main/resources/templates/system/elExam/onlineExam/toExam.html index 8fb8f78..06b6670 100644 --- a/ruoyi-admin/src/main/resources/templates/system/elExam/onlineExam/toExam.html +++ b/ruoyi-admin/src/main/resources/templates/system/elExam/onlineExam/toExam.html @@ -56,7 +56,7 @@ <div><strong>试卷总分:</strong>[[${ exam.totalScore }]]分</div> <div><strong>及格分数:</strong>[[${ exam.qualifyScore }]]分</div> <div><strong>考试描述:</strong>[[${ exam.content }]]</div> - <div><strong>开放类型:</strong>[[${ exam.openType}]]</div> + <div><strong>开放类型:</strong><span th:text="${exam.openType == 1 ? '完全开放' : (exam.openType == 2 ? '部门开放' : '默认值')}"></span></div> </el-card> diff --git a/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/view.html b/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/view.html index f57b13c..30de060 100644 --- a/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/view.html +++ b/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/view.html @@ -2,66 +2,63 @@ <html lang="zh" xmlns:th="http://www.thymeleaf.org" > <head> <th:block th:include="include :: header('详情')" /> + <th:block th:include="include :: element-css" /> </head> <body class="white-bg"> -<div class="wrapper wrapper-content animated fadeInRight ibox-content" > - <tbody th:each="columns : ${list}"> - <div style="border-bottom: 1px solid #ccc;line-height: 41px;box-sizing: border-box"> - <div class="row"> - <div class="col-sm-6"> - <div class="form-group"> - <label class="col-sm-4 control-label">考试时间:</label> - <div class="col-sm-8"> - <span class="date">[[${#dates.format(columns.updateTime, 'yyyy-MM-dd hh:MM:ss')}]]</span> - </div> - </div> - </div> - <div class="col-sm-6"> - <div class="form-group"> - <label class="col-sm-4 control-label">考试用时:</label> - <div class="col-sm-8"> - <span class="date">[[${columns.userTime}]]分钟</span> - </div> - </div> - </div> - </div> - <div class="row"> - <div class="col-sm-6"> - <div class="form-group"> - <label class="col-sm-4 control-label">考试得分:</label> - <div class="col-sm-8"> - <span class="date">[[${columns.userScore}]]</span> - </div> - </div> - </div> - <div class="col-sm-6"> - <div class="form-group"> - <label class="col-sm-4 control-label">及格分:</label> - <div class="col-sm-8"> - <span class="date">[[${columns.qualifyScore}]]</span> - </div> - </div> - </div> - </div> - <div class="row"> - <div class="col-sm-6"> - <div class="form-group"> - <label class="col-sm-4 control-label">考试状态:</label> - <div class="col-sm-8"> - <span th:if="${columns.state} eq 0 ">考试中</span> - <span th:if="${columns.state} eq 1 ">待阅卷</span> - <span th:if="${columns.state} eq 2 ">已完成</span> - <span th:if="${columns.state} eq 3 ">弃考</span> - </div> - </div> - </div> - </div> - </div> - </tbody> +<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app"> + <div> + <el-card v-for="item in paperList" style="margin-bottom: 10px; line-height: 30px;"> + + <el-row :gutter="20"> + <el-col :span="12"> + 考试时间:{{ formatDate(item.createTime) }} + </el-col> + + <el-col :span="12"> + 考试用时:{{ item.userTime }}分钟 + </el-col> + + <el-col :span="12"> + 考试得分:{{ item.userScore }} + </el-col> + + <el-col :span="12"> + 是否合格:{{ item.userScore > item.qualifyScore ?'是':'否' }} + </el-col> + + <el-col :span="12"> + 考试状态:{{ item.state | paperStateFilter }} + </el-col> + + </el-row> + + </el-card> + </div> </div> <th:block th:include="include :: footer" /> +<th:block th:include="include :: element-js" /> <script th:inline="javascript"> - + var app = new Vue({ + el: '#app', + data: { + paperList: [] + }, + mounted(){ + this.paperList = [[${list}]]; + }, + methods:{ + formatDate(dateString) { + const date = new Date(dateString); + const year = date.getFullYear(); + const month = ('0' + (date.getMonth() + 1)).slice(-2); + const day = ('0' + date.getDate()).slice(-2); + const hours = ('0' + date.getHours()).slice(-2); + const minutes = ('0' + date.getMinutes()).slice(-2); + const seconds = ('0' + date.getSeconds()).slice(-2); + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; + } + } + }) </script> </body> </html>