<template>
	<a-c-form :createForm="createForm">
		<a-form-item required label="是否至今" name="是否至今">
			<a-radio-group v-model:value="createForm.end_today" button-style="solid">
				<a-radio-button value="1">非至今</a-radio-button>
				<a-radio-button value="2">至今</a-radio-button>
			</a-radio-group>
		</a-form-item>
		<a-form-item label="学校/培训机构" name="school_or_institution">
			<a-input v-model:value="createForm.school_or_institution" placeholder="请输入学校/培训机构" />
		</a-form-item>
		<a-form-item required label="专业" name="major">
			<a-input v-model:value="createForm.major" placeholder="请输入专业" />
		</a-form-item>
		<a-form-item label="获得证书" name="certificate">
			<a-input v-model:value="createForm.certificate" placeholder="请输入获得证书" />
		</a-form-item>
		<a-form-item label="曾获学校奖项或技能比赛奖项" name="certificate">
			<a-input v-model:value="createForm.awards" placeholder="请输入曾获学校奖项或技能比赛奖项" />
		</a-form-item>
		<a-form-item label="曾任职务" name="awards">
			<a-input v-model:value="createForm.awards" placeholder="请输入曾任职务" />
		</a-form-item>
		<a-form-item :wrapper-col="{ span: 14, offset: 4 }">
			<a-button type="primary" @click="onSubmit">保存</a-button>
			<a-button style="margin-left: 10px">重置</a-button>
		</a-form-item>
		
	</a-c-form>
</template>

<script lang="ts" setup>
	import { ref, onMounted, watch, computed } from 'vue';
	let createForm = ref({
		 start_year: 0,
		      start_month: 0,
		      end_year: 0,
		      end_month: 0,
		      end_today: 0,
		      school_or_institution: '',
		      major: '',
		      certificate: '',
		      awards: '',
		      positions_held: '',
	})
	
	const resetForm = () => {
		createForm.value = {
			 start_year: 0,
			      start_month: 0,
			      end_year: 0,
			      end_month: 0,
			      end_today: 0,
			      school_or_institution: '',
			      major: '',
			      certificate: '',
			      awards: '',
			      positions_held: '',
		}
	}
</script>

<style>
</style>