<template>
	<view>
		<view class="header_wrapper" v-if="info">
			<view v-if="1" class="hospital_wrapper">
				<view class="hospital_icon_wrapper">
					<image src="@/static/assets/dingwei@2x.png"></image>
				</view>
				<view class="hospital_name_wrapper">{{info.hospital.name}}</view>
				<!-- <view class="hospital_select_wrapper">
					<image src="@/static/assets/gengduo@2x.png"></image>
				</view> -->
			</view>
			<view v-if="1" class="user_wrapper" @click="tabPatients()">
				<view class="user_title_wrapper">体检人：</view>
				<view class="user_name_wrapper">{{info.person.name}}</view>
				<view v-if="info.person.count>1" class="user_choose_wrapper">
					<image src="@/static/assets/qiehuan@2x.png"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
 import {
 	ref,
 	computed,
 	nextTick
 } from "vue";
 import {
 	$image,
 	$api,
 	$response
 } from "@/api";
 import {
 	onShow,
 	onLoad
 } from "@dcloudio/uni-app";
 let info=ref(null);
 const getBaseInfo = async () => {
 	uni.showLoading()
 	const response = await $api('BaseInfo',{
			hospital_id:1
		})
 	uni.hideLoading()
 	$response(response, () => {
 		 info.value=response.data
 		
 	})
 }
 const tabPatients = () => {
 	uni.navigateTo({
 		url: "/pages/user/choose/choose",
 	});
 };
 onShow(() => {  
 		 getBaseInfo()
 
 });
</script>

<style scoped>
 
.user_choose_wrapper {
		width: 50rpx;
		height: 50rpx;
		margin-left: 30rpx;
	}
	
	.user_choose_wrapper image {
		width: 50rpx;
		height: 50rpx;
		display: block;
		object-fit: contain;
	}
	
	.user_title_wrapper {
		font-weight: 400;
		font-size: 26rpx;
		color: #fff;
		line-height: 1;
	}
	
	.user_name_wrapper {
		font-weight: 400;
		font-size: 26rpx;
		color: #fff;
		line-height: 1;
	}
	
	.user_wrapper {
		height: 60rpx;
		padding-left: 40rpx;
		padding-right: 20rpx;
		margin-right: 20rpx;
		background: #009ea7;
		border-radius: 40rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.header_wrapper {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 710rpx;
		height: 90rpx;
		background: #d8edf2;
		margin: 0 auto;
		position: relative;
		 
		background-color: #fff;
		margin-left: 20rpx;
		margin-right: 20rpx;
		border-radius: 20rpx;
	}
	
	.hospital_wrapper {
		display: flex;
		align-items: center;
		width: 40%;
	}
	
	.hospital_icon_wrapper {
		width: 48rpx;
		height: 48rpx;
		margin-left: 20rpx;
	}
	
	.hospital_icon_wrapper image {
		width: 48rpx;
		height: 48rpx;
		display: block;
		object-fit: contain;
	}
	
	.hospital_name_wrapper {
		font-weight: 400;
		font-size: 28rpx;
		color: #484747;
		margin-left: 9rpx;
		line-height: 1;
	}
	
	.hospital_select_wrapper {
		width: 24rpx;
		height: 14rpx;
		margin-left: 19rpx;
	}
	
	.hospital_select_wrapper image {
		width: 24rpx;
		height: 14rpx;
		display: block;
		object-fit: contain;
	}
</style>
