<template>
	<scroll-view scroll-y="true" class="scroll-view">
		<view class="list-scroll-view">
			<view class="speaker">
				<view class="one">
					<view class="one_1">
						<view class="left">姓名</view>
						<view class="right textOne">
							<text>{{speakerInfo.name||'暂无姓名'}}</text>
						</view>
					</view>
					<view class="one_1">
						<view class="left">手机号</view>
						<view class="right textOne">
							<text>{{speakerInfo.mobile||'暂无手机号'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type!='Patient'">
						<view class="left">医院名称</view>
						<view class="right">
							<text>{{speakerInfo.hos_name||'暂无医院名称'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type!='Patient'">
						<view class="left">科室名称</view>
						<view class="right">
							<text>{{speakerInfo.dept_name||'暂无科室名称'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type!='Patient'">
						<view class="left">职务</view>
						<view class="right">
							<text>{{speakerInfo.title||'暂无职务'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type!='Patient'">
						<view class="left">职称</view>
						<view class="right">
							<text>{{speakerInfo.post||'暂无职称'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type!='Patient'">
						<view class="left">简介</view>
						<view class="right">
							<text>{{speakerInfo.content||'暂无简介'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type=='Patient'">
						<view class="left">就诊编号/卡号</view>
						<view class="right textOne">
							<text>{{speakerInfo.card_no||'暂无就诊编号/卡号'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type=='Patient'">
						<view class="left">性别</view>
						<view class="right textOne">
							<text>{{speakerInfo.gender||'暂无性别'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type=='Patient'">
						<view class="left">年龄</view>
						<view class="right textOne">
							<text>{{speakerInfo.age||'暂无年龄'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type=='Patient'">
						<view class="left">住址</view>
						<view class="right textOne">
							<text>{{speakerInfo.address||'暂无住址'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type=='Patient'">
						<view class="left">紧急联系人</view>
						<view class="right textOne">
							<text>{{speakerInfo.urgent_name||'暂无紧急联系人'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type=='Patient'">
						<view class="left">紧急联系人电话</view>
						<view class="right textOne">
							<text>{{speakerInfo.urgent_mobile||'暂无紧急联系人电话'}}</text>
						</view>
					</view>
					<view class="one_1" v-if="type=='Patient'">
						<view class="left">病例</view>
						<view class="right" @tap="onPreview(speakerInfo.emrs[0].url)">
							<image class="image"
								:src="speakerInfo.emrs&&speakerInfo.emrs.length>0?speakerInfo.emrs[0].url:''" mode="">
							</image>
						</view>
					</view>
				</view>
			</view>
		</view>
	</scroll-view>
</template>

<script>
	export default {
		props: {
			speakerInfo: {
				type: Object,
				default: {}
			},
			type: {
				type: String,
				default: ''
			}
		},
		data() {
			return {};
		},
		methods: {
			// 预览图片
			onPreview(e) {
				const that = this
				that.$emit('onPreview', e);
			},
		}
	};
</script>

<style lang="scss" scoped>
	.speaker {
		max-height: 35vh;

		.one {
			padding: 2vw;

			.one_1 {
				display: flex;
				justify-content: space-between;
				padding: 3vw;
				border-bottom: 1px solid var(--f9Color);
				font-size: var(--font14Size);
				color: var(--f69Color);

				.right {
					text-align: right;
					width: 50vw;

					.image {
						width: 20vw;
						height: 20vw;
						border-radius: 5px;
					}
				}
			}
		}
	}
</style>