<template>
	<view>
		
		<view class="title">
			学生信息
		</view>
		
		<!-- 基本信息 -->
		<template>
			<view class="content">
			   <u-cell :value="user" isLink @click="show=true">
				   <view
						slot="title"
						class="u-slot-title"
					>
						<text class="u-cell-text">
							班级
							<image class="box" src="../../static/im@2x.png"></image>
						</text>
					</view>
			   </u-cell>
			   <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
			</view>
			
			<view class="content">
			   <u-cell :value="user" isLink @click="show=true">
				   <view
						slot="title"
						class="u-slot-title"
					>
						<text class="u-cell-text">
							姓名
							<image class="box" src="../../static/im@2x.png"></image>
						</text>
					</view>
			   </u-cell>
			   <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
			</view>
		</template>
		
		<!-- 请假类型 -->
		<template>
			<view class="content" style="margin-top: 20rpx;">
			   <u-cell :value="user" isLink @click="show=true">
				   <view
						slot="title"
						class="u-slot-title"
					>
						<text class="u-cell-text">
							请假类型
							<image class="box" src="../../static/im@2x.png"></image>
						</text>
					</view>
			   </u-cell>
			   <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
			</view>
			
			<view class="content">
			   <u-cell :value="user" isLink @click="show=true">
				   <view
						slot="title"
						class="u-slot-title"
					>
						<text class="u-cell-text">
							病假类型
							<image class="box" src="../../static/im@2x.png"></image>
						</text>
					</view>
			   </u-cell>
			   <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
			</view>
			
			<view class="content">
			   <u-cell :value="user" isLink @click="show=true">
				   <view
						slot="title"
						class="u-slot-title"
					>
						<text class="u-cell-text">
							体温
							<image class="box" src="../../static/im@2x.png"></image>
						</text>
					</view>
			   </u-cell>
			   <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
			</view>
		</template>
		
		<view class="title">
			请假时间
		</view>
		
		<!-- 请假时间 -->
		<template>
			<view class="content">
			   <u-cell :value="user" isLink @click="show=true">
				   <view
						slot="title"
						class="u-slot-title"
					>
						<text class="u-cell-text">
							开始时间
							<image class="box" src="../../static/im@2x.png"></image>
						</text>
					</view>
			   </u-cell>
			   <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
			</view>
			
			<view class="content">
			   <u-cell :value="user" isLink @click="show=true">
				   <view
						slot="title"
						class="u-slot-title"
					>
						<text class="u-cell-text">
							天数
							<image class="box" src="../../static/im@2x.png"></image>
						</text>
					</view>
			   </u-cell>
			   <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
			</view>
			
			<view class="content">
			   <u-cell :value="user" isLink @click="show=true">
				   <view
						slot="title"
						class="u-slot-title"
					>
						<text class="u-cell-text">
							结束时间
						</text>
					</view>
			   </u-cell>
			   <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
			</view>
		</template>
		
		<!-- 请假事由 -->
		<view class="symptom">
			<text class="u-cell-text">
				请假事由
			</text>
			
			<u--textarea border="none" style="margin: 32rpx 0 72rpx 0; padding: 0;" v-model="symptom" placeholder="请输入" autoHeight ></u--textarea>
		</view>
		
		<!-- 照片 -->
		<view class="symptom">
			<text class="u-cell-text" style="color: rgba(0,0,0,0.60);">
				照片
			</text>
			
			<u-upload
				:fileList="fileList3"
				@afterRead="afterRead"
				@delete="deletePic"
				name="3"
				multiple
				:maxCount="10"
				:previewFullImage="true"
				style="margin-top: 30rpx"
			>
				<template>
					<view class="upImage">
						<u-icon name="plus" color="#8C8C8C" size="49rpx"></u-icon>
					</view>
				</template>
			</u-upload>
		</view>
		
		
		<!-- 提交按钮 -->
		<view class="submit">
			<u-button
				shape="circle"
				type="primary"
				text="提交"
				color="#7B5DF0"
				style="width: 550rpx;"
			></u-button>
		</view>
		
	</view>

</template>

<script>
	export default {
		data() {
			return {
				user:"请选择",
				show:false,
				symptom: "", // 症状文本
				fileList3: [{
					url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
				}],
				columns:[
					[
						{
							name:"王晶",
							id:1,
						},
						{
							name:"李明",
							id:2
						}
					]
				],
			}
		},
		methods: {
         choiceUser(e){
			 console.log("e==>",e)
			 this.show=false;
			 this.user=e.value[0].name;
		 }
		}
	}
</script>

<style lang="scss" scoped>
	page{
		/* background-color: #D9D9D9; */
		background-color: #F5F5F5 !important;
	}
	
	.title{
		height: 80rpx;
		line-height: 80rpx;
		font-size: 23rpx;
		color: rgba(0,0,0,0.60);
		background: #f5f6f7;
		color: rgba(0,0,0,0.60);
		padding-left: 32rpx;
		box-sizing: border-box;
	}
	
	.u-cell{
		background-color: #fff;
		height: 112rpx;
		line-height: 73rpx;
	}
	
	.u-cell-text {
		font-size: 32rpx;
	}
	
	.u-cell-text image{
		width: 10rpx;
		height: 28rpx;
		margin-left: 15rpx	;
	}
	
	.symptom{
		margin-top: 20rpx;
		padding: 32rpx 32rpx;
		box-sizing: border-box;
		background-color: #fff;
	}
	
	.upImage{
		width: 160rpx;
		height: 160rpx;
		border-radius: 16rpx;
		border: 2rpx solid #d9d9d9;
		display: flex;
		justify-content: center;
	}
	
	.choice{
		height: 178rpx;
		background-color: #fff;
		margin-top: 20rpx;
		padding-top: 36rpx;
		box-sizing: border-box;
	}
	
	.submit{
		height: 240rpx;
		padding-top: 49rpx;
		box-sizing: border-box;
	}
	
</style>
