<template>
	<view class="page">
		<view class="content">
			<view class="message-list">
				<view class="titleall-box">
					<view class="titleall-left">
						<view class="titleall-left-line"></view>接报信息
					</view>
				</view>
				<view class="info-box">
					<view class="info-box-list">
						<view class="info-box-width1">
							<view class="info-box-small">接报时间</view>
							<view class="info-box-overflow">{{message.reportTime}}</view>
						</view>
					</view>
					<view class="info-box-list">
						<view class="info-box-width1">
							<view class="info-box-small">接报渠道</view>
							<view class="info-box-overflow">{{message.reportPlatform}}</view>
						</view>
					</view>
					<view class="info-box-list">
						<view class="info-box-width1">
							<view class="info-box-small">发生地点</view>
							<view class="info-box-overflow">{{message.incidentLocation}}</view>
						</view>
					</view>
					<view class="info-box-list">
						<view class="info-box-width">
							<view class="info-box-small">儿童姓名</view>
							<view class="info-box-overflow">{{message.childName}}</view>
						</view>
						<view class="info-box-width">
							<view class="info-box-small">儿童性别</view>
							<view class="info-box-overflow">{{message.sex == 0 ? '男':message.sex == 1 ? '女': '未填写'}}
							</view>
						</view>
					</view>
					<view class="info-box-list">
						<view class="info-box-width">
							<view class="info-box-small">儿童年龄</view>
							<view class="info-box-overflow">{{message.age}}</view>
						</view>
					</view>
					<view class="info-box-list">
						<view class="info-box-width1">
							<view class="info-box-small">报告原因</view>
							<view class="info-box-overflow">{{message.reportReason}}</view>
						</view>
					</view>
					<view class="info-box-list">
						<view class="info-box-width1">
							<view class="info-box-small">其他信息</view>
							<view class="info-box-overflow">{{message.reportRecord}}</view>
						</view>
					</view>
				</view>
			</view>
			<view class="message-list">
				<view class="titleall-box">
					<view class="titleall-left">
						<view class="titleall-left-line"></view>报告人信息
					</view>
				</view>
				<view class="info-box">
					<view class="info-box-list">
						<view class="info-box-width">
							<view class="info-box-small">姓名</view>
							<view class="info-box-overflow">{{message.reporterName}}</view>
						</view>
						<view class="info-box-width">
							<view class="info-box-small">与儿童关系</view>
							<view class="info-box-overflow">{{message.relationshipWithChild}}</view>
						</view>
					</view>
					<view class="info-box-list">
						<view class="info-box-width">
							<view class="info-box-small">电话</view>
							<view class="info-box-overflow">{{message.phone}}</view>
						</view>
					</view>
					<view class="info-box-list">
						<view class="info-box-width1">
							<view class="info-box-small">报告主体</view>
							<view class="info-box-overflow">{{message.reporterType}}<span
									v-if="message.reporterType != null">:</span>{{content}}</view>
						</view>
					</view>
				</view>
			</view>
			<view class="top-box"
				@click="gopath('/pages/receiptRegistration/receiptRegistrationSchedule?item=' +JSON.stringify(item.caseByCaseHelpFlowPos))">
				<view>查看进度</view>
				<view class="top-box-img">
					<image src="../../static/right2.png"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import BASE_URL from "@/common/config.js"
	export default {
		data() {
			return {
				// 接报信息
				message: {},
				// 报告主体内容
				content: '',
				item: {}
			};
		},
		computed: {},
		onLoad(params) {
			this.item = JSON.parse(params.item);
			this.message = this.item.chiAdoptCaseRegistrationPo;
			if (this.message.reporterType == '群众') {
				this.content = this.message.reporterOccupation;
			} else {
				this.content = this.message.reporterOrganizationName;
			}
			console.log('item', this.item)
		},
		methods: {
			gopath(e) {
				uni.navigateTo({
					url: e
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.page {
		padding-bottom: 10rpx;
	}

	.listBox {
		position: relative;
		z-index: 1;
	}

	.content {
		width: 100%;
		// padding-bottom: 120rpx;
	}

	.topimg {
		margin: 25rpx;

		image {
			width: 100%;
			border-radius: 20rpx;
		}
	}

	.titleall-box {
		display: flex;
		justify-content: space-between;
		padding: 40rpx 20rpx 20rpx 0;

		.titleall-left {
			font-size: 32rpx;
			font-weight: bold;
			display: flex;
			align-items: center;

			.titleall-left-line {
				width: 14rpx;
				height: 36rpx;
				border-radius: 0 10rpx 10rpx 0;
				background-color: #667FFF;
				box-shadow: 0 0 10rpx 5rpx #d1d9ff;
				margin-right: 20rpx;
			}
		}
	}

	.message-list {
		background-color: #FFFFFF;
		border-radius: 20rpx;
		font-size: 26rpx;
		margin: 25rpx;

		.info-box {
			padding: 0 40rpx;
			border-radius: 20rpx;
			margin-bottom: 30rpx;

			.info-box-list {
				display: flex;
				align-items: center;
				border-bottom: 2rpx solid #ececec;
				padding-top: 30rpx;
				padding-bottom: 30rpx;

				.width100 {
					width: 100% !important;
				}

				.info-box-width1 {
					width: 100%;
					font-size: 30rpx;
					font-weight: bold;

					.info-box-overflow {
						width: 95%;
						display: -webkit-box;
						-webkit-box-orient: vertical;
						-webkit-line-clamp: 1;
						overflow: hidden;
					}

					.info-box-small {
						font-size: 26rpx;
						color: #a8a8a8;
						font-weight: 500;
						margin-bottom: 10rpx;
					}

					.info-box-list-img {
						margin-top: 30rpx;

						image {
							width: 180rpx;
							height: 180rpx;
							border-radius: 20rpx;
						}
					}

					.info-box-list-sm {
						background-color: #F7F7F7;
						border-radius: 20rpx;
						font-size: 28rpx;
						color: #909090;
						font-weight: 500;
						width: 100%;
						padding: 20rpx;
						margin-top: 20rpx;
					}

					.green {
						color: #00D970;
					}
				}

				.info-box-width {
					width: 50%;
					font-size: 30rpx;
					font-weight: bold;

					.info-box-overflow {
						width: 95%;
						display: -webkit-box;
						-webkit-box-orient: vertical;
						-webkit-line-clamp: 1;
						overflow: hidden;
					}

					.info-box-small {
						font-size: 26rpx;
						color: #a8a8a8;
						font-weight: 500;
						margin-bottom: 10rpx;
					}

					.info-box-list-img {
						margin-top: 30rpx;

						image {
							width: 180rpx;
							height: 180rpx;
							border-radius: 20rpx;
						}
					}

					.info-box-list-sm {
						background-color: #F7F7F7;
						border-radius: 20rpx;
						font-size: 28rpx;
						color: #909090;
						font-weight: 500;
						width: 100%;
						padding: 20rpx;
						margin-top: 20rpx;
					}

					.green {
						color: #00D970;
					}
				}

				.serve {
					display: flex;
					justify-content: space-between;
					width: 100%;

					.serve-title {
						font-size: 30rpx;
						font-weight: bold;
					}

					.serve-right {
						font-size: 28rpx;
						text-align: right;
						color: #909090;

						.serve-right-top {
							margin-bottom: 20rpx;
						}
					}
				}
			}

			.info-box-list:last-child {
				border-bottom: 0;
			}
		}
	}

	.skip-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100rpx;
		margin-top: 70rpx;
		position: fixed;
		bottom: 30rpx;

		.cart-add {
			display: flex;
			align-items: center;
			justify-content: center;
			width: 38%;

			image {
				width: 253rpx;
				height: 80rpx;
				box-shadow: 5rpx 10rpx 20rpx 0 #efefef;
				border-radius: 100rpx;
			}

			text {
				font-size: 30rpx;
				font-weight: bold;
				color: #262626;
				position: absolute;
				z-index: 1;
			}
		}

		.buy-at {
			display: flex;
			align-items: center;
			justify-content: center;
			width: 58%;

			image {
				width: 415rpx;
				height: 80rpx;
				box-shadow: 5rpx 10rpx 20rpx 0 #b7c8ff;
				border-radius: 100rpx;
			}

			text {
				font-size: 30rpx;
				font-weight: bold;
				color: #FFFFFF;
				position: absolute;
				z-index: 1;
			}
		}
	}

	.top-box {
		display: flex;
		justify-content: space-between;
		margin: 30rpx;
		font-size: 30rpx;
		font-weight: bold;
		background-color: #fff;
		border-radius: 20rpx;
		padding: 30rpx;

		.top-box-img {
			image {
				width: 40rpx;
				height: 40rpx;
			}
		}
	}
</style>