123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- <template>
- <a-form :model="createForm" :label-col="{span: 6}" labelAlign="right">
- <a-row gutter="20">
- <a-col span="12">
- <a-row>
- <a-col span="24">
- <a-form-item required label="工作经验">
- <a-xuanze :dict="2021" placeholder="请选择工作经验" @saveSelect="saveExperience"
- :select_content="addOtherForm.experience_select"></a-xuanze>
- </a-form-item>
- </a-col>
- <a-col span="24">
- <a-form-item label="学历">
- <a-xuanze :dict="2006" placeholder="请选择学历" @saveSelect="saveSchoolDegree"
- :select_content="addOtherForm.school_degree_select"></a-xuanze>
- </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-xuanze :dict="2006" placeholder="请选择职称要求" @saveSelect="saveProfelevel"
- :select_content="addOtherForm.profe_level_select"></a-xuanze>
- </a-form-item>
- </a-col>
- <a-col span="24">
- <a-form-item required label="技能认证">
- <a-xuanze :dict="2015" placeholder="请选择技能认证" @saveSelect="saveCertification"
- :select_content="addOtherForm.certification_select"></a-xuanze>
- </a-form-item>
- </a-col>
-
- <a-col span="24">
- <a-form-item label="语言要求">
- <a-xuanze :dict="2007" placeholder="请选择语言要求" @saveSelect="saveLanguage"
- :select_content="addOtherForm.language_select"></a-xuanze>
- </a-form-item>
- </a-col>
- <a-col span="24">
- <a-form-item label="掌握程度">
- <a-xuanze :dict="2007" placeholder="请选择掌握程度" @saveSelect="saveLanguageDegree"
- :select_content="addOtherForm.language_degree_select"></a-xuanze>
- </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-radio-group v-model:value="createForm.marital_status" 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 required label="专业" name="major">
- <a-input v-model:value="createForm.major" placeholder="请输入专业" />
- </a-form-item>
- </a-col>
- <a-col span="24">
- <a-form-item label="证书要求">
- <a-checkbox-group v-model:value="createForm.license">
- <a-row>
- <template v-for="(item, index) in licenseOption">
- <a-col span="8">
- <a-checkbox :value="item.id">{{item.name}}</a-checkbox>
- </a-col>
- </template>
- </a-row>
- </a-checkbox-group>
- </a-form-item>
- </a-col>
- <a-col span="24">
- <a-form-item label="籍贯要求" name="mandarin">
- <a-jilian :dict="2009" @saveCascader="compantJiguanSave" placeholder="请选择籍贯"
- :cascader_content="addOtherForm.company_jiguan_cascader"></a-jilian>
- </a-form-item>
- </a-col>
- <a-col span="24">
- <a-form-item label="所在地要求" name="mandarin">
- <a-jilian :dict="2009" @saveCascader="compantSuozaidiSave" placeholder="请选择所在地"
- :cascader_content="addOtherForm.company_suozaidi_cascader"></a-jilian>
- </a-form-item>
- </a-col>
- <a-col span="24">
- <a-form-item required label="保存">
- <a-button type="primary" block @click="sumbitForm">保存</a-button>
- </a-form-item>
- </a-col>
- </a-row>
- </a-col>
- </a-row>
- </a-form>
- </template>
-
- <script setup lang="ts">
- import { ref, onMounted, computed } from 'vue';
- import { GetDictTree } from '@/apis/models';
-
- let licenseOption = ref<Object[]>([])
- onMounted(async () => {
- GetDictTree({
- code: 2018
- }).then(res => {
- licenseOption.value = res.data.dicts
- })
- })
- let createForm : companyListType.addrFormType = ref({
- experience: 0,
- school_degree: 0,
- degree_better: 0,
- profelevel: 0,
- certification: 0,
- language: 0,
- language_degree: 0,
- sex: 3,
- age_min: 0,
- age_max: 0,
- marital_status: 3,
- major: '',
- license: [],
- household_province: 0,
- household_city: 0,
- location_province: 0,
- location_city: 0,
- location_town: 0,
- })
-
-
- let addOtherForm = ref<companyListType.addOtherFormType>({
- experience_select: '请选择工作经验',
- school_degree_select: '请选择学历',
- profe_level_select: '请选择职称要求',
- certification_select: '请选择技能认证',
- language_select: '请选择语言要求',
- language_degree_select: '请选择掌握程度',
- company_jiguan_cascader: '',
- company_suozaidi_cascader: '',
- })
-
- // 工作经验
- const saveExperience = (data) => {
- createForm.value.experience = data.val;
- }
-
- // 学历要求
- const saveSchoolDegree = (data) => {
- createForm.value.school_degree = data.val;
- }
-
- // 职称要求
- const saveProfelevel = (data) => {
- createForm.value.profelevel = data.val;
- }
-
- // 技能认证
- const saveCertification = (data) => {
- createForm.value.certification = data.val;
- }
-
- // 语言要求
- const saveLanguage = (data) => {
- createForm.value.language = data.val;
- }
-
- // 掌握程度
- const saveLanguageDegree = (data) => {
- createForm.value.language_degree = data.val;
- }
-
- // 选择籍贯
- const compantJiguanSave = (data) => {
- createForm.value.household_province = data.arr1[0] ? data.arr1[0] : 0;
- createForm.value.household_city = data.arr1[1] ? data.arr1[1] : 0;
- }
-
- // 选择所在地
- const compantSuozaidiSave = (data) => {
- createForm.value.location_province = data.arr1[0] ? data.arr1[0] : 0;
- createForm.value.location_city = data.arr1[1] ? data.arr1[1] : 0;
- createForm.value.location_town = data.arr1[2] ? data.arr1[2] : 0;
- }
-
- const sumbitForm = () => {
- console.log(createForm.value)
- // PostCompanyEdit(createForm.value).then(res => {
- // successToast('保存成功');
- // resetForm();
- // }).catch(err => {
- // })
- }
-
- const resetForm = () => {
- addOtherForm.value = {
- chengli_date: '',
- content: '',
- photo_img: '',
- license_img: '',
- company_photo_img: '',
- company_address_cascader: '',
- company_industry_cascader: '',
- company_nature_cascader: '',
- company_scale_cascader: '',
- }
- createForm.value = {
- experience: 0,
- school_degree: 0,
- degree_better: 0,
- profelevel: 0,
- certification: 0,
- language: 0,
- language_degree: 0,
- sex: 3,
- age_min: 0,
- age_max: 0,
- marital_status: 3,
- major: '',
- license: [],
- household_province: 0,
- household_city: 0,
- location_province: 0,
- location_city: 0,
- location_town: 0,
- }
- }
- </script>
-
- <style>
- </style>
|