<template>
	<view class="assign-mission">
		<scroll-view class="scroll-y" scroll-y="true">
			<tm-radio-group
			  :list="list"
				label="改善工具"
				:defaultValue='defaultValue'
				@change="changeSelect"
				:setting="{
				  value: 'value',
				  name: 'label'
			  }"
		  />
		  <view class="switch-box">
			  <text class="label">需要审核改善方案</text>
			  <switch checked="true" style="transform:scale(1.5)" />
		  </view>
		  <tm-radio-group
			  :list="list"
			  :defaultValue='defaultValue'
			  @change="changeSelect"
			  :setting="{
				  value: 'value',
				  name: 'label'
			  }"
		  />
		</scroll-view>
		<view class="fixed-buttom-btn">
			<text class="btn-text">确定</text>
		</view>
	</view>
</template>

<script>
	// 指派改善任务
	export default {
		data() {
			return {
				defaultValue: 1,
				list: [
					{value: 1, label: 'PDCA1'},
					// {value: 2, label: 'PDCA2'},
					// {value: 3, label: 'PDCA3'},
					// {value: 4, label: 'PDCA4'}
				]
			}
		},
		created() {
			uni.setNavigationBarTitle({
				title: '指派改善任务'
			});
		},
		methods: {
			changeSelect(selectVal, selectData, i) {
				this.defaultValue = selectVal;
			}
		}
	}
</script>

<style lang="less">
	.assign-mission {
		height: 100%;

		.scroll-y {
			height: calc(100% - 87.5rpx);

			.switch-box {
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin: 15rpx 0;
				height: 87.5rpx;
				background-color: #fff;
				padding: 0 25rpx;

				.label {
					font-size: 22.5rpx;
					color: #292C33;
				}
			}
		}
	}
</style>
