<template>
	<uni-check-list :listData="list" types="radio" @ok="chooseOk" @rightClick="viewDetail">
		<view slot="right">
			详情 <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888"></u-icon>
		</view>
	</uni-check-list>
</template>

<script>
	export default {
		data() {
			return {
				list: [
					{
						id: '1232',
						name: '爱的街坊邻居爱上了对方加拉附件爱的街坊邻居爱上了对方加拉附件',
					},
					{
						id: '2223',
						name: 'banner',
					},
					{
						id: '3333',
						name: 'orange',
					}
				],
				value: '',
			}
		},
		methods: {
			// 选中方案,item 返回的是数组
			chooseOk(item) {
				console.log(item)
				if(item.length==0){
					uni.showToast({
						icon:'none',
						title:'请选择考评方案'
					})
				}else{
					//关闭当前页面，这里处理数据逻辑
				}
			},
			// 查看详情
			viewDetail(item){
				uni.navigateTo({
					url:"/pages/evaluatePlan/planDetail?id="+item.id
				})
			}
		}
	}
</script>

<style lang="scss">
	page{
		height: 100%;
	}
</style>
