typeRadioTemp.vue 2.9 KB
<template>
	<view>
		<view style="margin-top: 16rpx;" v-for="(item,index) in keyList" :key="index">
			<view class="bottomWrap" :class="{marBottom:!item.show}">
				<view class="bottomItem" @click="item.show = !item.show">
					<view class="bottomLeft">
						{{item.titleDesc}}{{item.title}}
					</view>
					<view class="bottomRight">
						{{item.subTitle}}
						<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 class="subCheckWrap" v-if="item.show" v-for="(subItem,subIndex) in item.subKeyList" :key="subIndex">
				<view class="subCheckItem">
					<view class="subCheckLeft">
						{{subIndex + 1 + '.'}}{{subItem.FIELDCN}}
					</view>
					<view class="subCheckCenter">
						{{subItem.CONTENT}}
					</view>
					<view class="subCheckRight">
						<view class="yc" :class="{active:subItem.FILEDSTATICS == 0}" @click="choose('yc',index,subIndex)">
							异常
						</view>
						<view class="yz" :class="{active:subItem.FILEDSTATICS == 1}" @click="choose('yz',index,subIndex)">
							一致
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

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

<style>
	.bottomWrap{padding: 0 32rpx;background: #fff;}
	.bottomWrap.marBottom{margin-bottom: 16rpx;}
	.bottomWrap .bottomItem{display: flex;justify-content: space-between;align-items: center;height: 104rpx;font-size: 30rpx;}
	.bottomItem .bottomLeft{display: flex;align-items: center;}
	.bottomItem .bottomRight{color: #969799;display: flex;align-items: center;}
	.bottomRight image{width: 32rpx;height: 32rpx;}
	.subCheckWrap{padding: 0 32rpx 0 64rpx;}
	.subCheckWrap .subCheckItem{display: flex;align-items: center;padding: 20rpx 0; color: #646566;font-size: 28rpx;}
	.subCheckItem .subCheckLeft{flex: 1;}
	.subCheckItem .subCheckCenter{width: 180rpx;padding: 0 10rpx;word-break: break-word;text-align: center;}
	.subCheckItem .subCheckRight{display: flex;align-items: center;width:200rpx;justify-content: space-between;}
	.subCheckRight .yc{width: 95rpx;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;}
	.yc.active{background: #ffeeec;border: 1rpx solid #f2485a;color: #f2485a;}
	.subCheckRight .yz{width: 95rpx;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>