driverSchool/newPages/examinationList/index.vue

191 lines
5.8 KiB
Vue
Raw Normal View History

2025-03-15 17:32:23 +08:00
<template>
<view class="page flex-col">
<view class="block_1 flex-row">
2025-04-01 17:57:14 +08:00
2025-03-15 17:32:23 +08:00
</view>
<view class="block_2 flex-col">
<view class="box_3 flex-row">
<image
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguoluru/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
2025-04-01 17:57:14 +08:00
@click="handleBack()"
2025-03-15 17:32:23 +08:00
/>
<text class="text_1">考试结果录入</text>
2025-04-01 17:57:14 +08:00
2025-03-15 17:32:23 +08:00
</view>
2025-04-02 18:05:36 +08:00
<!-- <view class="box_5 flex-col">
2025-03-15 17:32:23 +08:00
<view class="block_3 flex-row justify-between">
<view class="text-group_1 flex-col justify-between">
<text class="text_2">2025-01-20</text>
<text class="text_3">考试名称</text>
</view>
<view class="text-group_2 flex-col justify-between">
<text class="text_4">99</text>
<text class="text_5">考试通过</text>
</view>
</view>
<view class="block_4 flex-row justify-between">
<view class="text-wrapper_1 flex-col">
<text class="text_6">科目二</text>
</view>
<view class="text-wrapper_2 flex-col">
<text class="text_7">C2</text>
</view>
</view>
<view class="text-wrapper_3 flex-row justify-between">
<text class="text_8">考试地址</text>
<text class="text_9">山东省济南市历下区</text>
</view>
<view class="block_5 flex-row">
<view class="text-wrapper_4 flex-col">
<text class="text_10">开始评价</text>
</view>
</view>
2025-04-02 18:05:36 +08:00
</view> -->
2025-03-15 17:32:23 +08:00
<view class="list_1 flex-col">
<view
class="list-items_1 flex-col"
2025-04-02 18:05:36 +08:00
v-for="(item, index) in examList"
2025-03-15 17:32:23 +08:00
:key="index"
>
<view class="block_6 flex-row justify-between">
<view class="text-group_3 flex-col justify-between">
2025-04-02 18:05:36 +08:00
<text class="text_11" >{{ formatDate(item.examTime) }}</text>
<text class="text_12" >{{item.courseName}}</text>
2025-03-15 17:32:23 +08:00
</view>
<view class="text-group_4 flex-col justify-between">
<text
class="text_13"
2025-04-02 18:05:36 +08:00
:style="{ color: item.examScore }"
>{{item.examScore}}</text>
2025-03-15 17:32:23 +08:00
<text
class="text_14"
2025-04-02 18:05:36 +08:00
:style="{ color: item.examStatus }"
>{{ getStatusText(item.examStatus) }}</text>
2025-03-15 17:32:23 +08:00
</view>
</view>
<view class="block_7 flex-row justify-between">
<view class="text-wrapper_5 flex-col">
2025-04-02 18:05:36 +08:00
<text class="text_15" >{{getCourseTypeText(item.subject)}}</text>
2025-03-15 17:32:23 +08:00
</view>
<view class="text-wrapper_6 flex-col">
2025-04-02 18:05:36 +08:00
<text class="text_16" >{{item.courseType}}</text>
2025-03-15 17:32:23 +08:00
</view>
</view>
2025-04-02 18:05:36 +08:00
<!-- <view class="text-wrapper_7 flex-row justify-between">
<text class="text_17" >{{3}}</text>
<text class="text_18" >{{4}}</text>
</view> -->
2025-03-15 17:32:23 +08:00
</view>
</view>
</view>
<view class="block_8 flex-col">
2025-04-01 17:57:14 +08:00
<view class="text-wrapper_8 flex-col" @click="goScorerecord()">
2025-03-15 17:32:23 +08:00
<text class="text_19">笔试成绩录入</text>
</view>
</view>
</view>
</template>
<script>
2025-04-02 18:05:36 +08:00
import { getLocalUserInfo } from '../../utils/auth';
import request from '@/utils/request.js'
2025-03-15 17:32:23 +08:00
export default {
data() {
return {
loopData0: [
{
lanhutext0: '2025-01-20',
lanhutext1: '考试名称',
lanhutext2: '60分',
lanhufontColor2: 'rgba(251,66,59,1.000000)',
lanhutext3: '考试未通过',
lanhufontColor3: 'rgba(251,66,59,1.000000)',
lanhutext4: '科目二',
lanhutext5: 'C2',
lanhutext6: '考试地址:',
lanhutext7: '山东省济南市历下区'
},
{
lanhutext0: '2025-01-20',
lanhutext1: '考试名称',
lanhutext2: '--',
lanhufontColor2: 'rgba(51,51,51,1.000000)',
lanhutext3: '待审批',
lanhufontColor3: 'rgba(51,51,51,1.000000)',
lanhutext4: '科目二',
lanhutext5: 'C2',
lanhutext6: '考试地址:',
lanhutext7: '山东省济南市历下区'
}
],
2025-04-02 18:05:36 +08:00
userInfo: {},
examList: {},
2025-03-15 17:32:23 +08:00
constants: {}
};
},
2025-04-02 18:05:36 +08:00
onLoad(){
this.userInfo = getLocalUserInfo()
this.getExamList()
},
2025-04-01 17:57:14 +08:00
methods: {
handleBack() {
uni.navigateBack({
delta: 1
});
},
goScorerecord(){
uni.navigateTo({
url: '/newPages/examinationAdd/index'
});
2025-04-02 18:05:36 +08:00
},
getExamList(){
request({
url: '/app-api/process/getExamListByUserId',
method:'GET',
params: {
userId: this.userInfo.id,
}
}).then(res => {
this.examList = res.data
console.log('examList', this.examList)
console.log('res',res)
})
},
getStatusText(status) {
const statusMap = {
0: '未通过',
1: '已通过',
9: '已送考',
'null': '未送考',
};
return statusMap[status] || '未知状态';
},
getCourseTypeText(status) {
const statusMap = {
'1': '科目一',
'2': '科目二',
'3': '科目三',
'4': '科目四',
};
return statusMap[status] || '未知状态';
},
formatDate(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始需要+1
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
2025-04-01 17:57:14 +08:00
}
}
2025-03-15 17:32:23 +08:00
};
</script>
<style lang='scss'>
@import '../common/common.scss';
@import './assets/style/index.rpx.scss';
</style>