<template>
	<view class="container">
		<view class="page">
			<view class="complaints">
				<view class="information" @click="toDetail()">
					<view class="title yellow">小区垃圾桶太少<view class="tag">待处理</view>
					</view>
					<view class="content">
						<view class="item">
							<view class="name">投诉人</view>
							<view class="detail">张三123 156****7800 </view>
						</view>
						<view class="item">
							<view class="name">投诉时间</view>
							<view class="detail">2022年3月12日</view>
						</view>
					</view>
				</view>
				<view class="information" @click="toDetail()">
					<view class="title gray">浴霸不出水了<view class="tag">已完成</view>
					</view>
					<view class="content">
						<view class="item">
							<view class="name">投诉人</view>
							<view class="detail">张三123 156****7800 </view>
						</view>
						<view class="item">
							<view class="name">投诉时间</view>
							<view class="detail">2022年3月12日</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="form-submit-fixed">
			<view class="form-submit" @click="toEditor()">新增投诉</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		methods: {
			toDetail() {
				uni.navigateTo({
					url: '/pages/complaintsDetail/index',
				});
			},
			toEditor() {
				uni.navigateTo({
					url: '/pages/complaintsAdd/index',
				});
			}
		},
		onLoad() {

		},
		onShow() {

		}
	}
</script>
<style>
	page {
		background-color: #F8F6F9;
	}
</style>
<style lang="scss" scoped>
	.page {
		padding: 30rpx 30rpx 90rpx;
		background-color: #F8F6F9;
	}

	.complaints {

		.information {
			background-color: #ffffff;
			border-radius: 16rpx;
			padding: 30rpx;
			margin-bottom: 30rpx;

			.title {
				height: 40rpx;
				line-height: 40rpx;
				padding-left: 20rpx;
				font-size: 32rpx;
				color: #373737;
				font-weight: bold;
				margin-bottom: 30rpx;

				.tag {
					font-size: 22rpx;
					padding: 2rpx 20rpx;
					border-radius: 30rpx;
					display: inline-block;
					float: right;
				}
			}

			.yellow {
				border-left: 2px solid #F1BD4D;

				.tag {
					color: #F1BD4D;
					border: 1px solid #F1BD4D;
					background-color: #FFFCF6;
				}
			}

			.red {
				border-left: 2px solid #F42E2E;

				.tag {
					color: #F42E2E;
					border: 1px solid #F42E2E;
					background-color: #FFF5F5;
				}
			}

			.green {
				border-left: 2px solid #10D680;

				.tag {
					color: #10D680;
					border: 1px solid #10D680;
					background-color: #F1FFF9;
				}
			}

			.gray {
				border-left: 2px solid #B6B6BA;

				.tag {
					color: #B6B6BA;
					border: 1px solid #B6B6BA;
					background-color: #F8F8F8;
				}
			}

			.content {
				border-top: 1px solid #F0F0F2;
				padding-top: 20rpx;

				.item {
					display: flex;
					height: 70rpx;
					line-height: 70rpx;

					.name {
						width: 35%;
						font-size: 28rpx;
						color: #CECED3;
					}

					.detail {
						font-size: 28rpx;
						color: #373737;
					}
				}
			}

		}
	}

	.form-submit-fixed {
		position: fixed;
		width: 100%;
		bottom: 10rpx;
	}

	.form-submit {
		margin: 0 30rpx;
		box-sizing: border-box;
		height: 80rpx;
		line-height: 80rpx;
		background-color: #6A59F2;
		border-radius: 80rpx;
		text-align: center;
		font-size: 28rpx;
		color: #FFFFFF;
	}
</style>