<!-- 隐患项 -->
<template>
	<view class="hiddenDangerItems">
		<view class="header">
			<view class="tabTitle_tow">
				<view class="tabTitle_tow_li" @tap="tabClickTow(index)" :key="index" v-for="(item,index) in tabTextTow">
					<view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item}}</view>
					<view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
				</view>
			</view>
			<view class="line"></view>
			<view class="search">
				<view class="search-l" @click="dialogOpen()">检查指标
					<img src="@/pages_safetyCheck/images/icon_06.png">
				</view>
				<view class="search-r">
					<img src="@/pages_safetyCheck/images/icon_aqjc_ss.png">
					模糊搜索检查项
				</view>
			</view>
		</view>
		<view class="list">
			<view class="total">待整改共2项</view>
			<view class="list-li" v-for="(item,index) in dataList">
				<view class="list-li-t">
					<img src="@/pages_safetyCheck/images/icon_xz_fc@1x.png">
					<view>{{item.name}}</view>
				</view>
				<view class="list-li-b">此检查项在当前实验室累计出现<text>{{item.num}}</text>次隐患</view>
			</view>
		</view>
	</view>

</template>

<script>
	import {
		config
	} from '@/api/request/config.js'
	export default {
		name: "hiddenDangerItems",
		components: {

		},
		data() {
			return {
				baseUrl: config.base_url,
				pageType: 1,
				tabTextTow: ['待整改', '已整改', '暂无法整改'],
				curTabTow: 0,
				form: {
					imgDtoList: [],
				},
				newData: {

				},
				dialogVisible: false,
				dataList: [{
						name: '1.1.1三级检查项目条款全显示三级检查项目条款检查项目条款检查项目条款全显示三级检查项目检查项目条款 检查项目条款条款全显示三级检查项目条款',
						num: '9'
					},
					{
						name: '隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐患内容隐 ',
						num: '9'
					},
				],

			}
		},
		onLoad(option) {
			this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
			this.pageType = this.newData.pageType;
			uni.setNavigationBarTitle({
				title: '实验室名称(房间号)'
			})
			if (this.pageType == 0) {
				//检查
				this.tabTextTow = ['待检查', '检查中', '已检查']
			} else if (this.pageType == 1) {
				//复查
				this.tabTextTow = ['待复查', '复查完毕', '退回整改']
			} else if (this.pageType == 2) {
				//整改
				this.tabTextTow = ['待整改', '已整改', '暂无法整改']
			}
		},
		onShow() {

		},
		mounted() {

		},
		methods: {
			//滚动事件
			scrollGet() {},
			//顶部tab点击
			tabClickTow(index) {
				this.curTabTow = index;
			},
			dialogOpen() {
				this.dialogVisible = true;
			},
			dialogClose() {
				this.dialogVisible = false;
			},
			quotaClick(index) {
				this.quotaIndex = index
			},

		}
	}
</script>

<style lang="stylus" scoped>
	.hiddenDangerItems {
		height: 100%;
		display flex;
		box-sizing: border-box;

		#totalColor-A {
			color: #0183FA;
			background: rgba(1, 131, 250, 0.2);
		}

		#totalColor-B {
			color: #16B531;
			background: rgba(22, 181, 49, 0.2);
		}

		#totalColor-C {
			color: #FF8C00;
			background: rgba(255, 140, 0, 0.2);
		}

		.header {
			width: 100%;
			position: fixed;
			top: 0rpx;
			z-index: 100;
			background: #fff;

			.tabTitle_tow {
				width: 520rpx;
				height: 80rpx;

				display flex;
				justify-content: flex-start;
				align-items: center;

				.tabTitle_tow_li {
					flex: 1;
					position: relative;
					text-align center;

					.tabTitle_tow_text {
						display: inline-block;
						font-size: 30rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #333333;
						line-height: 46rpx;
						position: relative;

						&.on {
							color: #0183FA;
						}
					}

					.tabTitle_tow_across {
						width: 50rpx;
						height: 4rpx;
						background: #0183FA;
						border-radius: 2rpx;
						margin-left: 38%;
						display none;

						&.on {
							display block;
						}
					}

				}
			}

			.line {
				width: 100%;
				height: 20rpx;
				background: #F5F5F5;
			}

			.search {
				width: 750rpx;
				height: 80rpx;
				background: #FFFFFF;
				border-radius: 0rpx 0rpx 0rpx 0rpx;
				display: flex;
				justify-content: flex-start;
				align-items: center;

				.search-l {
					width: 200rpx;
					height: 60rpx;
					border-radius: 50rpx 50rpx 50rpx 50rpx;
					border: 1rpx solid #E0E0E0;
					display: flex;
					justify-content: space-between;
					align-items: center;
					padding: 0 20rpx;
					box-sizing: border-box;
					margin: 0 32rpx 0 30rpx;

					>img {
						width: 24rpx;
						height: 12rpx;
					}
				}

				.search-r {
					width: 470rpx;
					height: 60rpx;
					background: #FFFFFF;
					border-radius: 50rpx 50rpx 50rpx 50rpx;
					border: 1rpx solid #E0E0E0;
					font-size: 24rpx;
					color: #999999;
					line-height: 60rpx;
					text-align: left;
					display: flex;
					justify-content: flex-start;
					align-items: center;
					padding: 0 20rpx;
					box-sizing: border-box;

					>img {
						width: 30rpx;
						height: 30rpx;
						margin-right: 20rpx;
					}
				}
			}
		}

		.list {
			width: 750rpx;
			background: #FFFFFF;
			margin-top: 200rpx;

			.total {
				width: 180rpx;
				height: 50rpx;
				background: rgba(1, 131, 250, 0.2);
				border-radius: 0rpx 0rpx 20rpx 0rpx;
				font-size: 24rpx;
				color: #0183FA;
				line-height: 50rpx;
				text-align: left;
				padding: 0rpx 22rpx;
				box-sizing: border-box;
				margin-bottom: 20rpx;
			}

			.list-li {
				margin: 0 30rpx;

				.list-li-t {
					width: 690rpx;
					background: #F5F5F5;
					border-radius: 10rpx 10rpx 10rpx 10rpx;
					display: flex;
					justify-content: flex-start;
					padding: 12rpx 20rpx 14rpx 14rpx;
					box-sizing: border-box;

					>img {
						width: 24rpx;
						height: 24rpx;
						margin-right: 30rpx;
					}

					>view {
						flex: 1;
						font-size: 24rpx;
						color: #3D3D3D;
						line-height: 34rpx;
						text-align: left;
					}
				}

				.list-li-b {
					font-size: 24rpx;
					color: #3D3D3D;
					line-height: 70rpx;
					text-align: right;

					>text {
						color: #FF0000;
					}
				}

			}
		}


	}
</style>
