subRadioTemp.vue 3.2 KB
<template>
	<view>
		<view class="checkTemp" :class="{noTop:checkIndex == 0}" v-for="(item,index) in keyList" :key="index">
			<view class="bottomWrap">
				<view class="bottomItem">
					<view class="bottomLeft">
						{{item.title}}
					</view>
					<view class="bottomRight">
						<image src="../static/image/icon_arrow_up.png" mode=""></image>
					</view>
				</view>
			</view>
			<view v-for="(subItem,subIndex) in item.subKeyList" :key="subIndex">
				<view class="subCheckWrap">
					<navigator class="subCheckItem" :url="'/pages/index/license/checkDetail?code='+subItem.code" hover-class="none">
						{{subItem.title}}
						<view class="subCheckRight">
							{{subItem.name}}
							<image src="../static/image/icon_arrow.png" mode=""></image>
						</view>
					</navigator>
				</view>
				<view class="subRadioWrap" v-for="(thItem,thIndex) in subItem.thKeyList" :key="thIndex">
					<view class="subRadioItem">
						{{thItem.title}}
						<view class="subRadioRight">
							<view class="yc" :class="{active:thItem.choose == 0}" @click="choose('yc',index,subIndex,thIndex)">
								异常
							</view>
							<view class="yz" :class="{active:thItem.choose == 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].choose = 0
				}else{
					this.keyList[index].subKeyList[subIndex].thKeyList[thIndex].choose = 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 .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>