subRadioTemp.vue 3.6 KB
<template>
	<view>
		<view class="checkTemp" :class="{noTop:checkIndex == 0}" v-for="(item,index) in keyList" :key="index">
			<view class="bottomWrap">
				<view class="bottomItem" @click="item.show = !item.show" :class="{bottomLine:!item.show}">
					<view class="bottomLeft">
						{{item.title}}
					</view>
					<view class="bottomRight">
						<image v-if="item.show" src="../static/image/icon_arrow_up.png" mode=""></image>
						<image v-if="!item.show" src="../static/image/icon_arrow.png" mode=""></image>
					</view>
				</view>
			</view>
			<view v-if="item.show" v-for="(subItem,subIndex) in item.subKeyList" :key="subIndex">
				<view class="subCheckWrap">
					<view class="subCheckItem" @click="subItem.show = !subItem.show">
						{{subIndex + 1}}.{{subItem.title}}
						<view class="subCheckRight">
							{{subItem.name}}
							<image v-if="subItem.show" src="../static/image/icon_arrow_up.png" mode=""></image>
							<image v-if="!subItem.show" src="../static/image/icon_arrow.png" mode=""></image>
						</view>
					</view>
				</view>
				<view class="subRadioWrap" v-if="subItem.show" v-for="(thItem,thIndex) in subItem.thKeyList" :key="thIndex">
					<view class="subRadioItem">
						({{thIndex + 1}}){{thItem.title}}
						<view class="subRadioRight">
							<view class="yc" :class="{active:thItem.FILEDSTATICS == 0}" @click="choose('yc',index,subIndex,thIndex)">
								异常
							</view>
							<view class="yz" :class="{active:thItem.FILEDSTATICS == 1}" @click="choose('yz',index,subIndex,thIndex)">
								一致
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		props:{
			keyList:{
				type:Array
			},
			checkIndex:{
				type:Number
			}
		},
		methods: {
			choose(type,index,subIndex,thIndex){
				if(type == 'yc'){
					this.keyList[index].subKeyList[subIndex].thKeyList[thIndex].FILEDSTATICS = 0
				}else{
					this.keyList[index].subKeyList[subIndex].thKeyList[thIndex].FILEDSTATICS = 1
				}
			}
		}
	}
</script>

<style>
	.checkTemp{margin-top: 16rpx;}
	.checkTemp.noTop{margin-top: 0;}
	.bottomWrap{padding: 0 32rpx;background: #fff;}
	.bottomWrap .bottomItem{display: flex;justify-content: space-between;align-items: center;height: 104rpx;font-size: 30rpx;}
	.bottomItem.bottomLine{border-bottom: 2rpx solid #f2f3f5;}
	.bottomItem .bottomLeft{display: flex;align-items: center;}
	.bottomRight image{width: 32rpx;height: 32rpx;}
	.subCheckWrap{padding: 0 32rpx 0 64rpx;background: #f7f8fa;}
	.subCheckWrap .subCheckItem{display: flex;justify-content: space-between;align-items: center;height: 96rpx;color: #646566;font-size: 28rpx;}
	.subCheckItem .subCheckRight{display: flex;align-items: center;}
	.subCheckRight image{width: 32rpx;height: 32rpx;}
	
	.subRadioWrap{padding: 0 32rpx 0 108rpx;background: #f2f3f5;}
	.subRadioWrap .subRadioItem{display: flex;justify-content: space-between;align-items: center;height: 96rpx;color: #646566;font-size: 28rpx;}
	.subRadioItem .subRadioRight{display: flex;align-items: center;}
	.subRadioRight .yc{width: 104rpx;height: 48rpx;background: #ffffff;border: 1rpx solid #dcdee0;border-radius: 48rpx 0 0 48rpx;text-align: center;line-height: 48rpx;color: #969799;font-size: 28rpx;margin: 0 10rpx 0 32rpx;}
	.yc.active{background: #ffeeec;border: 1rpx solid #f2485a;color: #f2485a;}
	.subRadioRight .yz{width: 104rpx;height: 48rpx;background: #ffffff;border: 1rpx solid #dcdee0;border-radius: 0 48rpx 48rpx 0;text-align: center;line-height: 48rpx;color: #969799;font-size: 28rpx;}
	.yz.active{background: #e8fff2;border: 1rpx solid #a1ddba;color: #58b981;}
</style>