修改
This commit is contained in:
@@ -26,38 +26,103 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
|
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
|
||||||
<div class="cards">
|
<div class="cards" v-for="(item,index) in dataList">
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<div class="cardHeadLeft">
|
<div class="cardHeadLeft">
|
||||||
<div class="cardTitle">2025年注册会计师证</div>
|
<div class="cardTitle">{{item.name}}</div>
|
||||||
<div class="titleType primary">未开始</div>
|
<div class="titleType success" v-if="item.score">已完成</div>
|
||||||
|
<div class="titleType info" v-else-if="dates<item.startDate">未开始</div>
|
||||||
|
<div class="titleType primary" v-else-if="(dates>item.startDate||dates==item.startDate)&&dates<item.dueDate">
|
||||||
|
进行中
|
||||||
|
</div>
|
||||||
|
<div class="titleType info" v-else-if="dates>item.dueDate">已过期</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rightBtn">立即练习</div>
|
<div class="rightBtn" v-if="(dates>item.startDate||dates==item.startDate)&&dates<item.dueDate&&item.isContinue!=1">开始考试</div>
|
||||||
|
<div class="rightBtn" v-if="(dates>item.startDate||dates==item.startDate)&&dates<item.dueDate&&item.isContinue==1">继续考试</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="heng"></div>
|
<div class="heng"></div>
|
||||||
<div class="cardCon">
|
<div class="cardCon">
|
||||||
<div class="conten">考试时长:120分钟</div>
|
<div class="conten">考试时长:{{item.timeLimit}}分钟</div>
|
||||||
<div class="conten">题目数量:88题</div>
|
<div class="conten">题目数量:{{item.totalQuestions}}题</div>
|
||||||
<div class="conten">及格分数:60分</div>
|
<div class="conten">分类:
|
||||||
<div class="conten">截止日期:2025-12-31</div>
|
<span v-for="(val, key) in classification">
|
||||||
|
<template v-if="item.category==val.dictValue">{{ val.dictLabel }}</template>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="conten">成绩:
|
||||||
|
<span v-if="item.gradeUser" >{{ item.gradeUser.score }}分</span>
|
||||||
|
<span v-else>--</span>
|
||||||
|
</div>
|
||||||
|
<div class="conten">开始时间:{{item.startDate}}</div>
|
||||||
|
<div class="conten">截止时间:{{item.dueDate}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flooter">
|
<div class="flooter">
|
||||||
<div @click="jumps('/packageB/train/mockExam/viewGrades')">查看成绩</div>
|
<div v-if="item.gradeUser" @click="jumps('/packageB/train/mockExam/viewGrades')">查看成绩</div>
|
||||||
<div>详情</div>
|
<div @click="handleDetail(item)">详情</div>
|
||||||
<div>收藏</div>
|
<div @click="collects(item,1)" v-if="item.isCollect==0">
|
||||||
|
<image :src="urls+'wsc.png'" mode="" style="width: 32rpx;height: 30rpx;"></image>
|
||||||
|
收藏
|
||||||
|
</div>
|
||||||
|
<div v-else @click="collects(item,0)">
|
||||||
|
<image :src="urls+'video-sc.png'" mode="" style="width: 32rpx;height: 30rpx;"></image>
|
||||||
|
取消
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cards"></div>
|
|
||||||
<div class="cards"></div>
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</div>
|
</div>
|
||||||
<div class="cards2" v-if="dialogVisible">
|
<div class="cards2" v-if="dialogVisible">
|
||||||
<div class="cardCon">
|
<div class="cardCon">
|
||||||
<div class="cardHead">
|
<div class="cardHead" style="margin-bottom: 20rpx;">
|
||||||
<div></div>
|
<div>{{examInfo.name}}</div>
|
||||||
<div style="font-size: 40rpx;" @click="clones()">×</div>
|
<div style="font-size: 40rpx;" @click="clones()">×</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="status-tags">
|
||||||
|
<div class="titleType success" v-if="examInfo.score">已完成</div>
|
||||||
|
<div class="titleType info" v-else-if="dates<examInfo.startDate">未开始</div>
|
||||||
|
<div class="titleType primary" v-else-if="(dates>examInfo.startDate||dates==examInfo.startDate)&&dates<examInfo.dueDate">
|
||||||
|
进行中
|
||||||
|
</div>
|
||||||
|
<div class="titleType info" v-else-if="dates>examInfo.dueDate">已过期</div>
|
||||||
|
|
||||||
|
<div class="titleType success" v-if="examInfo.difficulty=='easy'">初级</div>
|
||||||
|
<div class="titleType tertiary" v-if="examInfo.difficulty=='medium'">中级</div>
|
||||||
|
<div class="titleType primary2" v-if="examInfo.difficulty=='hard'">高级</div>
|
||||||
|
</div>
|
||||||
|
<div class="detailTitle">考试简介</div>
|
||||||
|
<div class="detailCon">{{ examInfo.description }}</div>
|
||||||
|
<div class="exam-info">
|
||||||
|
<div class="info-item">
|
||||||
|
<div class="info-value">{{ examInfo.timeLimit }}</div>
|
||||||
|
<div class="info-label">考试时长</div>
|
||||||
|
<div class="info-label">(分钟)</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-divider"></div>
|
||||||
|
<div class="info-item">
|
||||||
|
<div class="info-value">{{ examInfo.totalQuestions }}</div>
|
||||||
|
<div class="info-label">题目总数</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-divider"></div>
|
||||||
|
<div class="info-item">
|
||||||
|
<div class="info-value">{{ examInfo.passScore }}</div>
|
||||||
|
<div class="info-label">及格分数</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-divider"></div>
|
||||||
|
<div class="info-item">
|
||||||
|
<div class="info-value">{{ examInfo.totalScore }}</div>
|
||||||
|
<div class="info-label">总分</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="detailTitle">考试要求</div>
|
||||||
|
<div class="detailCon">考试过程中请勿刷新页面或关闭浏览器</div>
|
||||||
|
<div class="detailCon">请在规定时间内完成所有题目</div>
|
||||||
|
<div class="detailCon">考试开始后不可暂停,请确保网络连接稳定</div>
|
||||||
|
<div class="detailCon">考试结束后可查看成绩和答案解析</div>
|
||||||
|
|
||||||
|
<div style="display: flex;justify-content: center;margin-top: 30rpx;">
|
||||||
|
<div class="rightBtn" v-if="(dates>examInfo.startDate||dates==examInfo.startDate)&&dates<examInfo.dueDate&&examInfo.isContinue!=1">开始考试</div>
|
||||||
|
<div class="rightBtn" v-if="(dates>examInfo.startDate||dates==examInfo.startDate)&&dates<examInfo.dueDate&&examInfo.isContinue==1">继续考试</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -66,22 +131,138 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { inject, ref, reactive } from 'vue';
|
import { inject, ref, reactive } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
const { $api, navTo, navBack } = inject('globalFunction');
|
const { $api, navTo, navBack,urls } = inject('globalFunction');
|
||||||
import config from "@/config.js"
|
import config from "@/config.js"
|
||||||
|
const userInfo = ref({});
|
||||||
|
const Authorization = ref('');
|
||||||
const searchKeyword = ref('');
|
const searchKeyword = ref('');
|
||||||
const pageState = reactive({
|
const dataList=ref([])
|
||||||
page: 0,
|
const pageSize=ref(10)
|
||||||
list: [],
|
const pageNum=ref(1)
|
||||||
total: 0,
|
const totalNum=ref(0)
|
||||||
maxPage: 1,
|
const dates=ref('')
|
||||||
pageSize: 12,
|
const classification=ref([])
|
||||||
search: {},
|
const levalLabels=ref([])
|
||||||
});
|
const examInfo = ref({})
|
||||||
const baseUrl = config.imgBaseUrl
|
const baseUrl = config.imgBaseUrl
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
const handleScrollToLower = () => {
|
const handleScrollToLower = () => {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
onLoad(() => {
|
||||||
|
getDictionary()
|
||||||
|
const date = new Date();
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1; // 月份从0开始,需要加1
|
||||||
|
let day = date.getDate();
|
||||||
|
month=month>9?month:'0'+month
|
||||||
|
day=day>9?day:'0'+day
|
||||||
|
dates.value=year+'-'+month+'-'+day
|
||||||
|
Authorization.value=uni.getStorageSync('Padmin-Token')||''
|
||||||
|
getHeart();
|
||||||
|
});
|
||||||
|
function getHeart() {
|
||||||
|
const raw =Authorization.value;
|
||||||
|
const token = typeof raw === "string" ? raw.trim() : "";
|
||||||
|
const headers = token ? { 'Authorization': raw.startsWith("Bearer ") ? raw : `Bearer ${token}` }: {}
|
||||||
|
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
|
||||||
|
if (resData.code == 200) {
|
||||||
|
getUserInfo();
|
||||||
|
} else {
|
||||||
|
navTo('/packageB/login')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
function getUserInfo(){
|
||||||
|
let header={
|
||||||
|
'Authorization':Authorization.value
|
||||||
|
}
|
||||||
|
$api.myRequest('/system/user/login/user/info', {},'get',10100,header).then((resData) => {
|
||||||
|
userInfo.value = resData.info || {};
|
||||||
|
getDataList('refresh');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
function getDictionary(){
|
||||||
|
$api.myRequest('/system/public/dict/data/type/question_classification', {},'get',9100).then((resData) => {
|
||||||
|
classification.value=resData.data
|
||||||
|
});
|
||||||
|
$api.myRequest('/system/public/dict/data/type/question_level', {},'get',9100).then((resData) => {
|
||||||
|
levalLabels.value=resData.data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 搜索视频
|
||||||
|
function searchVideo() {
|
||||||
|
getDataList('refresh');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清除搜索内容
|
||||||
|
function clearSearch() {
|
||||||
|
searchKeyword.value = '';
|
||||||
|
getDataList('refresh');
|
||||||
|
}
|
||||||
|
// 获取考试列表
|
||||||
|
function getDataList(type = 'add') {
|
||||||
|
let maxPage=Math.ceil(totalNum.value/pageSize.value)
|
||||||
|
let params={}
|
||||||
|
if (type === 'refresh') {
|
||||||
|
pageNum.value = 1;
|
||||||
|
params={
|
||||||
|
name:searchKeyword.value,
|
||||||
|
pageSize:pageSize.value,
|
||||||
|
pageNum:pageNum.value,
|
||||||
|
userId:userInfo.value.userId
|
||||||
|
}
|
||||||
|
$api.myRequest('/train/public/trainExamDash/getExamPublishTable', params).then((resData) => {
|
||||||
|
if(resData.code==200){
|
||||||
|
dataList.value=resData.rows
|
||||||
|
totalNum.value=resData.total
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (type === 'add' && pageNum.value < maxPage) {
|
||||||
|
pageNum.value += 1;
|
||||||
|
params={
|
||||||
|
name:searchKeyword.value,
|
||||||
|
pageSize:pageSize.value,
|
||||||
|
pageNum:pageNum.value,
|
||||||
|
userId:userInfo.value.userId
|
||||||
|
}
|
||||||
|
$api.myRequest('/train/public/trainExamDash/getExamPublishTable', params).then((resData) => {
|
||||||
|
if(resData.code==200){
|
||||||
|
dataList.value=dataList.value.concat(resData.rows)
|
||||||
|
totalNum.value=resData.total
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function collects(row,i){
|
||||||
|
$api.myRequest('/train/public/examUser/addOrUpdateExamUser', {
|
||||||
|
userId:userInfo.value.userId,
|
||||||
|
examPaperId:row.examPaperId,
|
||||||
|
collect:i,
|
||||||
|
}).then((resData) => {
|
||||||
|
if(resData.code==200){
|
||||||
|
if(i==1){
|
||||||
|
$api.msg('收藏成功',2000)
|
||||||
|
}else{
|
||||||
|
$api.msg('已取消收藏',2000)
|
||||||
|
}
|
||||||
|
getDataList('refresh');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function handleDetail(row){
|
||||||
|
$api.myRequest('/train/public/trainExamDash/getExamPublishModel', {
|
||||||
|
userId:userInfo.value.userId,
|
||||||
|
examPaperId:row.examPaperId,
|
||||||
|
}).then((resData) => {
|
||||||
|
if(resData&&resData.code==200){
|
||||||
|
examInfo.value=resData.data
|
||||||
|
dialogVisible.value=true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
function jumps(url){
|
function jumps(url){
|
||||||
navTo(url);
|
navTo(url);
|
||||||
}
|
}
|
||||||
@@ -149,10 +330,10 @@ function clones(){
|
|||||||
}
|
}
|
||||||
.main-scroll {
|
.main-scroll {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 90%;
|
||||||
.cards{
|
.cards{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 260rpx;
|
height: 280rpx;
|
||||||
background: linear-gradient(0deg, #E3EFFF 0%, #FBFDFF 100%);
|
background: linear-gradient(0deg, #E3EFFF 0%, #FBFDFF 100%);
|
||||||
// box-shadow: 0px 0px 6px 0px rgba(0,71,200,0.32);
|
// box-shadow: 0px 0px 6px 0px rgba(0,71,200,0.32);
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
@@ -187,35 +368,15 @@ function clones(){
|
|||||||
line-height: 38rpx;
|
line-height: 38rpx;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
.primary{
|
|
||||||
border: 1px solid #157EFF;
|
|
||||||
color: #157EFF
|
|
||||||
}
|
|
||||||
.success{
|
|
||||||
border: 1px solid #05A636;
|
|
||||||
color: #05A636
|
|
||||||
}
|
|
||||||
.info{
|
|
||||||
border: 1px solid #898989;
|
|
||||||
color: #898989
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.rightBtn{
|
|
||||||
width: 140rpx;
|
|
||||||
height: 44rpx;
|
|
||||||
line-height: 44rpx;
|
|
||||||
background: linear-gradient(90deg, #00C0FA 0%, #1271FF 100%);
|
|
||||||
border-radius: 4px;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 24rpx;
|
|
||||||
text-align: center
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.heng{
|
.heng{
|
||||||
width: 120rpx;
|
width: 120rpx;
|
||||||
height: 4rpx;
|
height: 4rpx;
|
||||||
background: linear-gradient(88deg, #015EEA 0%, #00C0FA 100%);
|
background: linear-gradient(88deg, #015EEA 0%, #00C0FA 100%);
|
||||||
margin: 10rpx 0 30rpx;
|
margin: 10rpx 0 20rpx;
|
||||||
}
|
}
|
||||||
.cardCon{
|
.cardCon{
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -226,7 +387,11 @@ function clones(){
|
|||||||
color: #666666;
|
color: #666666;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center
|
align-items: center
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
.status-tags{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.flooter{
|
.flooter{
|
||||||
@@ -238,6 +403,7 @@ function clones(){
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
color: #2175F3;
|
color: #2175F3;
|
||||||
|
padding-top: 14rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -254,7 +420,7 @@ function clones(){
|
|||||||
padding: 100rpx 50rpx;
|
padding: 100rpx 50rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.cardCon{
|
.cardCon{
|
||||||
height: 100%;
|
height: 70%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -269,4 +435,83 @@ function clones(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.titleType{
|
||||||
|
display: inline-block
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #157EFF;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 38rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 38rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
.primary{
|
||||||
|
border: 1px solid #157EFF!important;
|
||||||
|
color: #157EFF!important
|
||||||
|
}
|
||||||
|
.success{
|
||||||
|
border: 1px solid #05A636!important;
|
||||||
|
color: #05A636!important
|
||||||
|
}
|
||||||
|
.info{
|
||||||
|
border: 1px solid #898989!important;
|
||||||
|
color: #898989!important
|
||||||
|
}
|
||||||
|
.tertiary{
|
||||||
|
border: 1px solid #E6A340!important;
|
||||||
|
color: #E6A340!important
|
||||||
|
}
|
||||||
|
.primary2{
|
||||||
|
border: 1px solid #F56C6C!important;
|
||||||
|
color: #F56C6C!important
|
||||||
|
}
|
||||||
|
.rightBtn{
|
||||||
|
width: 140rpx;
|
||||||
|
height: 44rpx;
|
||||||
|
line-height: 44rpx;
|
||||||
|
background: linear-gradient(90deg, #00C0FA 0%, #1271FF 100%);
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.detailTitle{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
margin: 30rpx 0;
|
||||||
|
}
|
||||||
|
.detailCon{
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.exam-info {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 35rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-item {
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-value {
|
||||||
|
font-family: 'D-DIN-Medium';
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #409EFF;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-label {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-divider {
|
||||||
|
width: 2px;
|
||||||
|
background-color: #C3E1FF;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="problemBtns">
|
<div class="problemBtns">
|
||||||
<div v-if="analysis&&judgWhether!=''&&questionIndex!=problemData.length" @click="questionIndex+=1">下一题</div>
|
<div v-if="analysis&&judgWhether!=''&&questionIndex!=problemData.length" @click="questionIndex+=1">下一题</div>
|
||||||
<div v-else :class="((radio==''&&radio2==''&&checkList.length==0&&isRunning)||analysis)?'events':''" @click="submit()">提交答案</div>
|
<div v-else :class="((radio===''&&radio2===''&&checkList.length==0&&isRunning)||analysis)?'events':''" @click="submit()">提交答案</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user