2025-11-04 10:33:49 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-box">
|
|
|
|
|
|
<div class="con-box">
|
|
|
|
|
|
<div class="tabCon">
|
2025-11-08 14:05:56 +08:00
|
|
|
|
<template v-for="(item,index) in gradeData">
|
|
|
|
|
|
<div class="tabLeft">
|
|
|
|
|
|
<div><span>考试名称:</span>{{item.name}}</div>
|
|
|
|
|
|
<div><span>考试时间:</span>{{item.createTime}}</div>
|
|
|
|
|
|
<div><span>考试成绩:</span>{{item.score}}分</div>
|
|
|
|
|
|
</div>
|
2025-11-08 14:28:24 +08:00
|
|
|
|
<div class="tabRight" @click="detail(item)">查看</div>
|
2025-11-08 14:05:56 +08:00
|
|
|
|
</template>
|
2025-11-04 10:33:49 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
2025-11-08 14:05:56 +08:00
|
|
|
|
<script setup>
|
|
|
|
|
|
import { reactive, inject, watch, ref, onMounted,onBeforeUnmount,computed } from 'vue';
|
|
|
|
|
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
|
|
|
|
|
const { $api,urls , navTo,navBack , vacanciesTo, formatTotal, config } = inject('globalFunction');
|
|
|
|
|
|
import useUserStore from '@/stores/useUserStore';
|
|
|
|
|
|
import useDictStore from '@/stores/useDictStore';
|
|
|
|
|
|
const userInfo = ref({});
|
|
|
|
|
|
const rows = ref({});
|
|
|
|
|
|
const Authorization = ref('');
|
|
|
|
|
|
const gradeData = ref([]);
|
|
|
|
|
|
onLoad((options) => {
|
|
|
|
|
|
rows.value=options
|
|
|
|
|
|
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 || {};
|
|
|
|
|
|
// userId.value=resData.info.userId
|
|
|
|
|
|
queryData()
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
function queryData(){
|
|
|
|
|
|
$api.myRequest('/train/public/trainExamDash/getExamByIdTable', {
|
|
|
|
|
|
userId:userInfo.value.userId,
|
|
|
|
|
|
examPaperId:rows.value.examPaperId,
|
|
|
|
|
|
}).then((resData) => {
|
|
|
|
|
|
if(resData&&resData.code==200){
|
|
|
|
|
|
gradeData.value=resData.rows
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2025-11-08 14:28:24 +08:00
|
|
|
|
function detail(row){
|
|
|
|
|
|
navTo('/packageB/train/mockExam/paperDetails?examPaperId='+row.examPaperId+'&examId='+row.examId+'&name='+row.name);
|
2025-11-08 14:05:56 +08:00
|
|
|
|
}
|
2025-11-04 10:33:49 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
|
|
.app-box{
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100vh;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
.con-box{
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
top:0;
|
|
|
|
|
|
z-index: 10;
|
|
|
|
|
|
padding: 20rpx 28rpx;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
.tabCon{
|
|
|
|
|
|
border-top: 1px solid #ccc;
|
|
|
|
|
|
border-left: 1px solid #ccc;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
.tabLeft{
|
|
|
|
|
|
width: 80%;
|
2025-11-08 14:05:56 +08:00
|
|
|
|
height: 150rpx;
|
2025-11-04 10:33:49 +08:00
|
|
|
|
border-bottom: 1px solid #ccc;
|
|
|
|
|
|
border-right: 1px solid #ccc;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
view{
|
|
|
|
|
|
line-height: 45rpx
|
2025-11-08 14:05:56 +08:00
|
|
|
|
color: #2175F3;
|
|
|
|
|
|
label{
|
|
|
|
|
|
color: #666;
|
|
|
|
|
|
}
|
2025-11-04 10:33:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.tabRight{
|
|
|
|
|
|
width: 20%;
|
2025-11-08 14:05:56 +08:00
|
|
|
|
height: 150rpx;
|
2025-11-04 10:33:49 +08:00
|
|
|
|
border-bottom: 1px solid #ccc;
|
|
|
|
|
|
border-right: 1px solid #ccc;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
line-height: 140rpx;
|
|
|
|
|
|
color: #2175F3;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|