stu_msg.vue 6.0 KB
<template>
	<view class="wrap_box">
		<!-- <uParse v-if="datas" :content="datas"></uParse> -->
		<!-- stu_bz_index -->
		<view class="tel_index_bg"></view>
		<view class="bz_box">
			<view class="stu_msg">
				<view class="stu_li">
					<view class="stu_l">
						姓名:
					</view>
					<view class="stu_r">
						{{datas.name}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						性别:
					</view>
					<view class="stu_r">
						{{datas.sex==1?'男':'女'}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						出生年月:
					</view>
					<view class="stu_r">
						{{datas.birth||''}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						籍贯:
					</view>
					<view class="stu_r">
						{{datas.native||''}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						民族:
					</view>
					<view class="stu_r">
						{{datas.nation||''}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						身份证号:
					</view>
					<view class="stu_r">
						{{datas.id_card||''}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						入学时间:
					</view>
					<view class="stu_r">
						{{datas.add_time||''}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						学号:
					</view>
					<view class="stu_r" style="color: #FF9A18;">
						<!-- 未分配 -->
						{{datas.study_code||'未分配'}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						住宿办理:
					</view>
					<view class="stu_r" style="color: #66C134;">
						<!-- 住宿状态 1、已缴费 2、未办理 -->
						{{datas.bed_type==1?'已缴费':'未办理'}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						小班教室:
					</view>
					<view class="stu_r">
						{{datas.small_seat}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						听课教室:
					</view>
					<view class="stu_r">
						{{datas.phone_box}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						手机箱:
					</view>
					<view class="stu_r">
						{{datas.phone_box}}
					</view>
				</view>
				<view class="stu_li">
					<view class="stu_l">
						床位:
					</view>
					<view class="stu_r">
						{{datas.bed_title}}
					</view>
				</view>
			</view>
		</view>
		<!-- 阻止滑动 -->
		<!-- <view @touchmove.stop.prevent='test'></view> -->
	</view>
</template>

<script>
	import Vue from 'vue'
	import {
		mapState,
		mapMutations
	} from 'vuex'
	var that 
	export default {
		data() {
			return {
				options:'',
				datas:'',
				tabs:[
					{
						title:'成绩变化'
					},
					{
						title:'思想动态'
					},
					{
						title:'生活'
					},
				],
				index:0
			}
		},
		computed: {
		...mapState(['hasLogin', 'forcedLogin', 'userName', 'userinfo','nowtime']),
		},
		onLoad(e) {
			that=this
			that.options=e||{}
			console.log(e)
			
			that.getdata()
		},
		onShow() {
			
		},
		methods: {
			// ...mapMutations(['wxshouquan','login']),
			test(){},
			save_fuc(){
				uni.showToast({
					icon:'none',
					title:'保存成功'
				})
				setTimeout(function(){
					uni.navigateBack({
						delta:1
					})
				},1000)
			},
			bindPickerChange: function(e) {
					console.log('picker发送选择改变,携带值为', e.detail.value)
					this.index = e.detail.value
			},
			del_fuc(item){
				uni.showModal({
					title: '提示',
					content: '是否删除该备注',
					success: function (res) {
						if (res.confirm) {
							console.log('用户点击确定');
							uni.showToast({
								icon:'none',
								title:'删除成功'
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			getdata() {
			
				var datas = {id:that.options.id}
				var jkurl = '/teacher/stu_detail'
			
				that.$service.P_post(jkurl, datas).then(res => {
					that.btnkg = 0
					console.log(res)
					if (res.code == 1) {
						that.htmlReset = 0
						var datas = res.data
						console.log(typeof datas)
			
						if (typeof datas == 'string') {
							datas = JSON.parse(datas)
						}
						console.log(res)
						that.datas=datas
					} else {
			
						if (res.msg) {
							uni.showToast({
								icon: 'none',
								title: res.msg
							})
						} else {
							uni.showToast({
								icon: 'none',
								title: '获取数据失败'
							})
						}
					}
				}).catch(e => {
					that.htmlReset = 1
					that.btnkg = 0
					// that.$refs.htmlLoading.htmlReset_fuc(1)
					console.log(e)
					uni.showToast({
						icon: 'none',
						title: '获取数据失败,请检查您的网络连接'
					})
				})
			},
			getimg(img){
				return service.getimg(img)
			},
			jump(e) {
				var that = this
				if (that.btnkg == 1) {
					return
				} else {
					that.btnkg = 1
					setTimeout(function() {
						that.btnkg = 0
					}, 2000)
				}
				console.log(e.currentTarget.dataset.type)
				service.jump(e)
			},
			goback(){
			  uni.navigateBack()
			},
			func(){
				// that.$store.commit('setSystem',datas.system)
			}
		}
	}
</script>

<style lang="scss" scoped>
.wrap_box{
	width: 100%;
	// padding: 30rpx;
	min-height: 100vh;
	// #ifdef H5
	min-height: calc(100vh - 44px);
	// #endif
	background: #F8F8F8;
	position: relative;
}
.tel_index_bg{
	position: absolute;
	top: 0;
	z-index: 1;
	width: 100%;
	min-height: 220rpx;
	background: linear-gradient(0deg, #f8f8f8 0%, #5D9DFD 60%, #428EFE 70%, #2D81FF 100%);
}
.bz_box{
	width: 100%;
	position: relative;
	z-index: 2;
	padding: 30rpx;
}
.stu_msg{
	width: 100%;
	background: #FFFFFF;
	border-radius: 10rpx;
	.stu_li{
		width: 100%;
		height: 93rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 30rpx;
		&+.stu_li{
			border-top: 1px solid #eee;
		}
		.stu_l{
			font-size: 32rpx;
			color: #545D71;
		}
		.stu_r{
			font-size: 32rpx;
			color: #A6A9B1;
		}
	}
}

</style>