achievementDetail.vue 3.1 KB
<template>
	<view class="info">
		<view style="display: flex;">
			<image class="header_bg" :src="vuex_baseImgUrl+'intership_header_bg.png'"></image>
			<view style="position: absolute;display: flex;">
				<image class="header_img" src="/static/img/internship/intership_header.png" mode=""></image>
				<text class="text_white">成绩详情</text>
			</view>
		</view>
		<view class="content">
			<view class="content_box">
				<view>
					<text>成绩</text>
					<text class="value_type">{{interDetail.level ? interDetail.level : interDetail.score}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>学分</text>
					<text class="value_type">{{interDetail.credit}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>考评人</text>
					<text class="value_type">{{interDetail.assessorName ? interDetail.assessorName : '--'}}</text>
				</view>
				
				<view style="margin-top: 32rpx;">
					<text>评价</text>
					<text class="value_type">{{interDetail.teacherView ? interDetail.teacherView : '--'}}</text>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getInternshipDetailApi,
	} from '@/config/api.js';
	
	export default {
		data() {
			return {
				id: '',
				interDetail: {},
				projectDetail: {},
				jobDetail: {},
				levels: {
					'excellence': '优秀',
					'good': '良好',
					'pass': '及格',
					'fail': '不及格'
				},
				grades: '',
			}
		},
		onLoad(e) {
			this.id = e.id;

			getInternshipDetailApi(this.id).then(res => {
				this.interDetail = res;
				this.projectDetail = res.projectDetail;
				this.jobDetail = res.jobDetail;
				this.grades = (res.markWay == "hierarchy" ? (res.level ? this.levels[res.level] : "--") : res
					.score + 0 + "/100")
			})
		},
		methods: {

			timeFormat(timestamp, format = 'yyyy-mm-dd') {
				return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--'
			},
		}
	}
</script>

<style lang="scss" scoped>
	.info {
		width: 690rpx;
		background-color: #F7F7F7;
		display: flex;
		flex-direction: column;
		padding: 30rpx;
		height: 100%;
	}

	.header_bg {
		width: 100%;
		height: 100rpx;
	}

	.header_img {
		width: 36rpx;
		height: 36rpx;
		margin-left: 32rpx;
		margin-right: 10rpx;
		margin-top: 26rpx;
	}

	.text_white {
		font-size: 32rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		line-height: 84rpx;
	}

	.content {
		width: 100%;
		background-color: #fff;
		border-bottom-left-radius: 12rpx;
		border-bottom-right-radius: 12rpx;

		.text_title {
			font-size: 32rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #000000;
			margin: 32rpx;
		}

		.divide_line {
			height: 1px;
			border: 1px solid rgba(0, 0, 0, 0.06);
			margin-top: 30rpx;
		}

		.content_box {
			padding: 32rpx;
			margin-bottom: 48rpx;
		}

		.value_type {
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			float: right;
			color: #000000;
			text-align: right;
			width: 400rpx;
		}
	}
</style>