intershipInfo.vue 7.7 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">
			<!-- 基本信息 -->
			<text class="text_title">基本信息</text>
			<view class="divide_line"></view>
			<view class="content_box">
				<view>
					<text>实习单号</text>
					<text class="value_type">{{interDetail.number}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>状态</text>
					<text v-if="interDetail.status == 'wait'" class="value_type">未开始</text>
					<text v-else-if="interDetail.status == 'running'" class="value_type">进行中</text>
					<text v-else-if="interDetail.status == 'done'" class="value_type">已结束</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>学生姓名</text>
					<text class="value_type">{{interDetail.studentName}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>是否到岗</text>
					<text v-if="interDetail.dutyStatus == 'wait'" class="value_type">未到岗</text>
					<text v-else-if="interDetail.dutyStatus == 'online'" class="value_type">已到岗</text>
					<text v-else-if="interDetail.dutyStatus == 'offline'" class="value_type">已离岗</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>学号</text>
					<text class="value_type">{{interDetail.studentNumber}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>学生手机号</text>
					<text class="value_type">{{interDetail.studentPhone}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>班级</text>
					<text class="value_type">{{interDetail.classInfo}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>实习成绩</text>
					<text v-if="grades" class="value_type">{{grades}}</text>
					<text v-else class="value_type">--</text>
				</view>
				<view style="margin-top: 32rpx; overflow: hidden;">
					<text>实习评价</text>
					<text v-if="interDetail.teacherView" class="value_type">{{interDetail.teacherView}}</text>
					<text v-else class="value_type">--</text>
				</view>
			</view>
			<!-- 项目信息 -->
			<text class="text_title">项目信息</text>
			<view class="divide_line"></view>
			<view class="content_box">
				<view>
					<text>开设院系</text>
					<text class="value_type">{{interDetail.departmentName}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>开设学期</text>
					<text class="value_type">{{interDetail.schoolTerm}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>实习计划</text>
					<text class="value_type"><text class="value_type">{{interDetail.planName}}</text></text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>实习项目</text>
					<text class="value_type">{{interDetail.projectName}}</text></text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>实习形式</text>
					<text v-if="projectDetail.practiceForm == 'oneself'" class="value_type">自主</text>
					<text v-else-if="projectDetail.practiceForm == 'centralize'"
						class="value_type">集中</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>实习开始时间</text>
					<text class="value_type">{{timeFormat(projectDetail.startTime)}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>实习结束时间</text>
					<text class="value_type">{{timeFormat(projectDetail.endTime)}}</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>实习指导老师</text>
					<text v-if="interDetail.teacherName" class="value_type">{{interDetail.teacherName}}</text>
					<text v-else class="value_type">--</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>老师手机号</text>
					<text v-if="interDetail.teacherPhone" class="value_type">{{interDetail.teacherPhone}}</text>
					<text v-else class="value_type">--</text>
				</view>
			</view>

			<!-- 单位信息 -->
			<text class="text_title">单位信息</text>
			<view class="divide_line"></view>
			<view class="content_box">
				<view>
					<text>实习企业</text>
					<text v-if="jobDetail.company"
						class="value_type">{{jobDetail.company}}</text>
					<text v-else class="value_type">--</text>
				</view>
				<view style="margin-top: 32rpx; overflow: hidden;">
					<text>实习岗位</text>
					<text class="value_type"
						style="width: 60%; white-space: nowrap;overflow: hidden; text-overflow: ellipsis">{{jobDetail.name}}</text>
				</view>
				<!-- <view style="margin-top: 32rpx;">
					<text>行业方向</text>
					<text class="value_type">{{interDetail.job.name}}</text>
				</view> -->
				<view style="margin-top: 32rpx;">
					<text>联系人</text>
					<text v-if="jobDetail.contactName"
						class="value_type">{{jobDetail.contactName}}</text>
					<text v-else class="value_type">--</text>
				</view>
				<view style="margin-top: 32rpx;">
					<text>联系电话</text>
					<text v-if="jobDetail.contactPhone"
						class="value_type">{{jobDetail.contactPhone}}</text>
					<text v-else class="value_type">--</text>
				</view>
				<!-- <view style="margin-top: 32rpx;">
					<text>企业邮箱</text>
					<text class="value_type">{{interDetail.job.contactPhone}}</text>
				</view> -->
				<view style="margin-top: 32rpx; overflow: hidden;">
					<text>实习地址</text>
					<text v-if="jobDetail.workSite"
						class="value_type">{{jobDetail.workSite}}</text>
					<text v-else class="value_type">--</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;
	}

	.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;

		.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>