<template>
	<view class="safe-mesure">
		<headers class="fixedheader" :themeType="true" :showBack="true">
			<view class="headerName">
				安全措施
			</view>
		</headers>
		<view class="safe-mesure-container">
			<view class="safe-mesure-header">
				<view class="header-left">安全措施</view>
				<view class="header-right">是否涉及</view>
			</view>
			<view class="safe-mesure-list">
				<view class="safe-mesure-item" v-for="(item,i) in JSON.parse(detailData.safeMeasure)" :key="i">
					<view class="item-left">
						{{item.name}}
					</view>
					<view class="item-right" style="color: red;">
						
						<text v-if="item.flag === '是'" style="color: green;">{{item.flag}}</text>
						<text v-if="item.flag === '否'" style="color: red;">{{item.flag}}</text>
					</view>
				</view>
			</view>
			<view class="other-safe">
				<view class="other-head">
					<view class="other-icon"></view>
					<view class="other-text">其他安全措施</view>
				</view>
				<view class="other-content">
					<view class="content-1" style="line-height: 40rpx;">
						其他安全内容：
						<text v-if="detailData.otherSafeMeasure">{{detailData.otherSafeMeasure[0].content}}</text>
						<text v-else>暂无数据</text>
					</view>
					<view class="content-3">
						<text style="float: right;">编制人：
						<text v-if="detailData.otherSafeMeasure">{{detailData.otherSafeMeasure[0].person}}</text>
						<text v-else>暂无数据</text>
					</text>
					</view>
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detailId: '',
				detailData: '',
				testList:[
					{"flag":"否","name":"动火设备内部构件清洗干净,蒸汽吹扫或水洗、置换合格,达到动火条件"},
					{"flag":"否","name":"的方式代替盲板与动火设备相连接的所有管线已断开,加盲板()块,未采取水封或仅关闭阀门"},
					{"flag":"是","name":"动火点周围及附近的孔洞、窨井、地沟、水封设施、污水井等已清除易燃物,并已采取覆盖、铺沙等手段进行隔离"},
					{"flag":"否","name":"油气罐区动火点同一防火堤内和防火间距内的油品储罐未进行脱水和取样作业"},
					{"flag":"否","name":"高处作业已采取防火花飞溅措施,作业人员佩戴必要的个体防护装备"},
					{"flag":"否","name":"在有可燃物构件和使用可燃物做防腐内衬的设备内部动火作业,已采取防火隔绝措施"},
					{"flag":"是","name":"乙炔气瓶直立放置,已采取防倾倒措施并安装防回火装置;乙炔气瓶、氧气瓶与火源间的距离不应小于10 m,两气瓶相互间距不应小于5 m"},
					{"flag":"否","name":"现场配备灭火器()台,灭火毯()块,消防蒸汽带或消防水带()"},
					{"flag":"否","name":"电焊机所处位置已考虑防火防爆要求,且已可靠接地"},
					{"flag":"否","name":"动火点周围规定距离内没有易燃易爆化学品的装卸、排放、喷漆等可能引起火灾爆炸的危险作业"},
					{"flag":"否","name":"动火点30m内垂直空间未排放可燃气体;15m内垂直空间未排放可燃液体;10m范围内及动火点下方未同时进行可燃溶剂清洗或喷漆等作业,10m范围内未见有可燃性粉尘清扫作业"},
					{"flag":"否","name":"已开展作业危害分析,制定相应的安全风险管控措施,交叉作业已明确协调人"},
					{"flag":"否","name":"用于连续检测的移动式可燃气体检测仪已配备到位"},
					{"flag":"是","name":"配备的摄录设备已到位,且防爆级别满足安全要求"},
					{"flag":"否","name":"其他相关特殊作业已办理相应安全作业票,作业现场四周已设立警戒区"},
				],
				testList2: [{"person":"312312","content":"12312"}]
			};
		},
		created() {
			this.getWork()
		},
		onLoad(options) {
			this.detailId = options.detailId
		},
		methods:{
			getWork(){
				this.sendRequest({
					url:'xmgl/xzSpecialOperationFireSafety/queryById',
					method:'get',
					data:{id:this.detailId},
					success:res=>{
						uni.hideLoading()
						this.detailData =  res.result
						//otherSafeMeasure
						console.log("=====================",this.detailData)
					}
				})
			},
		}
	}
</script>

<style lang="scss">
.safe-mesure{
	min-height: 100%;
	background: #F6F6F6;
	.fixedheader{
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		z-index: 2;
	}
	.safe-mesure-container{
		margin-top: 88rpx;
		padding: 0 30rpx;
		padding-bottom: 100rpx;
		// background-color: darkred;
		.safe-mesure-header{
			display: flex;
			// justify-content: space-between;
			margin-top: 10rpx;
			line-height: 80rpx;
			font-size: 32rpx;
			font-weight: bold;
			color: #81818c;
			.header-left{
				width: 75%;
				display: flex;
				justify-content: center;
			}
			.header-right{
				width: 25%;
				display: flex;
				justify-content: center;
			}
		}
		.safe-mesure-list{
			.safe-mesure-item{
				display: flex;
				// justify-content: space-between;
				margin-top: 15rpx;
				// line-height: 40rpx;
				.item-left{
					width: 75%;
				}
				.item-right{
					width: 25%;
					display: flex;
					justify-content: center;
					align-items: center;
				}
				
			}
		}
		.other-safe{
			margin-top: 50rpx;
			.other-head{
				display: flex;
				.other-icon{
					width: 10rpx;
					height: 40rpx;
					background-color: #2b8df3;
					border-radius: 100rpx;
				}
				.other-text{
					margin-left: 20rpx;
				}
			}
			.other-content{
				width: auto;
				height: 50rpx;
				// background-color: darkred;
				// border: 1rpx solid black;
				margin: 0 30rpx;
				margin-top: 25rpx;
			}
			
		}
	}
}
</style>
