<template>
	<a-form :model="createForm" :label-col="{span: 4}" labelAlign="right">
		<a-row gutter="20">
			<a-col span="12">
				<a-row>
					<a-col span="24">
						<a-form-item label="关键字" name="full_name">
							<a-input v-model:value="value" placeholder="Basic usage" />
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item label="关键词匹配" name="registration_number">
							<a-checkbox-group>
								<a-checkbox>求职意向</a-checkbox>
								<a-checkbox>工作经历</a-checkbox>
								<a-checkbox>教育经历</a-checkbox>
								<a-checkbox>技能专长</a-checkbox>
							</a-checkbox-group>
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item label="应聘职位" name="mandarin">
							<!-- 	<a-c-cascader :dict="2009" @saveCascader="compantJiguanSave" placeholder="请选择籍贯"
								:cascader_content="addOtherForm.company_jiguan_cascader"></a-c-cascader> -->
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item label="期望地区" name="mandarin">
							<!-- 	<a-c-cascader :dict="2009" @saveCascader="compantJiguanSave" placeholder="请选择籍贯"
								:cascader_content="addOtherForm.company_jiguan_cascader"></a-c-cascader> -->
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item label="户口所在地" name="mandarin">
							<!-- <a-c-cascader :dict="2009" @saveCascader="compantSuozaidiSave" placeholder="请选择所在地"
							:cascader_content="addOtherForm.company_suozaidi_cascader"></a-c-cascader> -->
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item label="学历">
							<!-- <a-c-select :dict="2006" placeholder="请选择学历" @saveSelect="saveSchoolDegree"></a-c-select> -->
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item label="含最高学历" name="degree_better">
							<a-radio-group v-model:value="createForm.degree_better" 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-col>
					<a-col span="24">
						<a-form-item required label="英语">
							<!-- <a-c-select :dict="2014" placeholder="请选择职称要求" @saveSelect="saveProfelevel"></a-c-select> -->
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item required label="国语">
							<!-- <a-c-select :dict="2014" placeholder="请选择职称要求" @saveSelect="saveProfelevel"></a-c-select> -->
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item required label="粤语">
							<!-- <a-c-select :dict="2014" placeholder="请选择职称要求" @saveSelect="saveProfelevel"></a-c-select> -->
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item required label="第二外语">
							<!-- <a-c-select :dict="2014" placeholder="请选择职称要求" @saveSelect="saveProfelevel"></a-c-select> -->
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item required label="计算机能力">
							<!-- <a-c-select :dict="2014" placeholder="请选择职称要求" @saveSelect="saveProfelevel"></a-c-select> -->
						</a-form-item>
					</a-col>
					
					<a-col span="24">
						<a-form-item required label="工作经验">
							<!-- <a-c-select :dict="2021" placeholder="请选择工作经验" @saveSelect="saveExperience"></a-c-select> -->
						</a-form-item>
					</a-col>
					
					<a-col span="24">
						<a-form-item label="性别" name="sex">
							<a-radio-group v-model:value="createForm.sex" button-style="solid">
								<a-radio-button :value="1">男</a-radio-button>
								<a-radio-button :value="2">女</a-radio-button>
								<a-radio-button :value="3">不限</a-radio-button>
							</a-radio-group>
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item label="最小年龄" name="age_min">
							<a-input-number :min="0" type="number" v-model:value="createForm.age_min"
								placeholder="请输入最小年龄" style="width: 100%;" />
						</a-form-item>
					</a-col>
					
					<a-col span="24">
						<a-form-item label="最大年龄" name="age_max">
							<a-input-number :min="0" type="number" v-model:value="createForm.age_max"
								placeholder="请输入最大年龄" style="width: 100%;" />
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item required label="简历更新" name="marital_status">
							
						</a-form-item>
					</a-col>
					<a-col span="24">
						<a-form-item required label="简历编号" name="major">
							<a-input v-model:value="createForm.major" placeholder="请输入专业" />
						</a-form-item>
					</a-col>
				
				
					
				</a-row>
			</a-col>
		</a-row>
	</a-form>
	<a-button block>保存</a-button>
</template>

<script setup lang="ts">
	import { ref, onMounted, computed, defineProps, watch, defineEmits } from 'vue';
	// import dayjs from 'dayjs';
	// import 'dayjs/locale/zh-cn';
	// dayjs.locale('zh-cn');
	// const dayjsRef = ref(dayjs);

	let createForm : companyListType.addrFormType = ref({
		full_name: '',
		registration_number: '',
		establishment_date: '',
		contact: '',
		phone: '',
		mobile: '',
		email: '',
		fax: '',
		website: '',
		province: 0,
		city: 0,
		district: 0,
		street: 0,
		address: '',
		industry: 0,
		nature: 0,
		scale: 0,
		introduction: '',
		photo: '',
		photo_status: 1,
		license_path: '',
		license_status: 1,
		login_name: '',
		login_pwd: '',
		company_photos: [],
	})

	let addOtherForm = ref<companyListType.addOtherFormType>({
		chengli_date: '',
		content: '',
		photo_img: '',
		license_img: '',
		company_photo_img: '',
		company_address_cascader: '',
		company_industry_cascader: '',
		company_nature_cascader: '',
		company_scale_cascader: '',
	})


	onMounted(async () => {
		// let res = await listSection({ page: 1, pagesize: 10, sort: 'id', sortby: "asc", keyword: "" });
		// section_list.value = res.data.sections;
	})

	// 上传图片
	// 企业照片
	// const uploadPhotoSuccess = (data : Object) => {
	// 	addOtherForm.value.photo_img = "http://114.132.245.7:242494" + data
	// 	createForm.value.photo = data
	// }

	// // 营业执照
	// const uploadLicenseSuccess = (data : Object) => {
	// 	addOtherForm.value.license_img = "http://114.132.245.7:242494" + data
	// 	createForm.value.license_path = data
	// }
	// // 企业相册
	// const uploadSuccess = (data : Object) => {
	// 	addOtherForm.value.company_photo_img = "http://114.132.245.7:242494" + data
	// 	createForm.value.company_photos.push({ photo: data })
	// }
	// // 成立日期
	// const establishmentDateChange = (val) => {
	// 	createForm.value.establishment_date = dayjsRef.value(val).format('YYYY-MM-DD');
	// }


	// // 选择地址
	// const compantAddressSave = (data) => {
	// 	createForm.value.province = data.arr1[0] ? data.arr1[0] : 0;
	// 	createForm.value.city = data.arr1[1] ? data.arr1[1] : 0;
	// 	createForm.value.district = data.arr1[2] ? data.arr1[2] : 0;
	// 	createForm.value.street = data.arr1[3] ? data.arr1[3] : 0;
	// }

	// // 所属行业 industrySave
	// const industrySave = (data) => {
	// 	createForm.value.industry = data.arr1[1] ? data.arr1[1] : 0;
	// }

	// // 企业性质
	// const natureSave = (data) => {
	// 	createForm.value.nature = data.arr1[1] ? data.arr1[1] : 0;
	// }

	// // 企业规模
	// const scaleSave = (data) => {
	// 	createForm.value.scale = data.val ? data.val : 0;
	// }

	// // 富文本
	// const onEditorUpdate = (data) => {
	// 	createForm.value.introduction = data
	// }

	// const sumbitForm = () => {
	// 	console.log(createForm.value)
	// 	if (createForm.value.full_name) {
	// 		if (!createForm.value.id) {
	// 			addCompany(createForm.value).then(res => {
	// 				message.success('新增企业成功');
	// 				hideModal();
	// 				resetForm();
	// 				emit('successAdd');
	// 			}).catch(err => {
	// 			})
	// 		} else {
	// 			PostCompanyEdit(createForm.value).then(res => {
	// 				message.success('修改企业信息成功');
	// 				hideModal();
	// 				resetForm();
	// 				emit('successAdd');
	// 			}).catch(err => {
	// 			})
	// 		}

	// 	} else {
	// 		message.warning('请补充完整信息');
	// 	}
	// }
</script>

<style>
</style>

<style>
</style>