| <!doctype html> | |||||
| <html lang="en"> | |||||
| <head> | |||||
| <meta charset="UTF-8" /> | |||||
| <link rel="icon" type="image/svg+xml" href="/vite.svg" /> | |||||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |||||
| <title>Vite + Vue + TS</title> | |||||
| <script type="module" crossorigin src="/assets/index-Jqf8tmaN.js"></script> | |||||
| <link rel="stylesheet" crossorigin href="/assets/index-xQS6ffIc.css"> | |||||
| </head> | |||||
| <body> | |||||
| <div id="app"></div> | |||||
| </body> | |||||
| </html> | |||||
| <!doctype html> | |||||
| <html lang="en"> | |||||
| <head> | |||||
| <meta charset="UTF-8" /> | |||||
| <link rel="icon" type="image/svg+xml" href="/vite.svg" /> | |||||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |||||
| <title>Vite + Vue + TS</title> | |||||
| <script type="module" crossorigin src="/assets/index-vl2I_K9U.js"></script> | |||||
| <link rel="stylesheet" crossorigin href="/assets/index-q4XN7VCE.css"> | |||||
| </head> | |||||
| <body> | |||||
| <div id="app"></div> | |||||
| </body> | |||||
| </html> | 
| <a-select v-model:value="selectValue" @change="handleChange" :placeholder="placeholder"> | <a-select v-model:value="selectValue" @change="handleChange" :placeholder="placeholder"> | ||||
| <a-select-option v-for="item in listOptions" :key="item.id" :value="item.id">{{item.name}}</a-select-option> | <a-select-option v-for="item in listOptions" :key="item.id" :value="item.id">{{item.name}}</a-select-option> | ||||
| </a-select> | </a-select> | ||||
| </template> | </template> | ||||
| <script lang="ts" setup> | <script lang="ts" setup> | ||||
| import { GetDictTree } from '@/apis/models'; | import { GetDictTree } from '@/apis/models'; | ||||
| const props = defineProps(['dict', 'placeholder', 'select_content']); | const props = defineProps(['dict', 'placeholder', 'select_content']); | ||||
| let listOptions = ref([]); | let listOptions = ref([]); | ||||
| let selectValue = ref<String>(); | |||||
| let placeholder = ref('请选择'); | |||||
| placeholder.value = props.placeholder | |||||
| let selectValue = ref<String>(props.select_content); | |||||
| let placeholder = ref<String>(props.placeholder); | |||||
| console.log(props.placeholder) | |||||
| watch(() => [props.dict, props.select_content], | watch(() => [props.dict, props.select_content], | ||||
| (newVal:string, oldVal:string) => { | (newVal:string, oldVal:string) => { | ||||
| GetDictTree({ | GetDictTree({ | 
| <template> | <template> | ||||
| <a-form :model="createForm" :label-col="{span: 6}" labelAlign="right"> | |||||
| <a-form :model="createForm" :label-col="{span: 8}" labelAlign="right"> | |||||
| <a-row gutter="20"> | <a-row gutter="20"> | ||||
| <a-col span="12"> | <a-col span="12"> | ||||
| <a-row> | <a-row> | ||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="是否公开联系电话" name="phone_public" :label-col="{span: 0}"> | |||||
| <a-form-item label="是否公开联系电话" name="phone_public"> | |||||
| <a-radio-group v-model:value="createForm.phone_public" button-style="solid"> | <a-radio-group v-model:value="createForm.phone_public" button-style="solid"> | ||||
| <a-radio-button :value="1">是</a-radio-button> | <a-radio-button :value="1">是</a-radio-button> | ||||
| <a-radio-button :value="2">否</a-radio-button> | <a-radio-button :value="2">否</a-radio-button> | ||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="是否公开手机" name="mobile_public" :label-col="{span: 0}"> | |||||
| <a-form-item label="是否公开手机" name="mobile_public"> | |||||
| <a-radio-group v-model:value="createForm.mobile_public" button-style="solid"> | <a-radio-group v-model:value="createForm.mobile_public" button-style="solid"> | ||||
| <a-radio-button :value="1">是</a-radio-button> | <a-radio-button :value="1">是</a-radio-button> | ||||
| <a-radio-button :value="2">否</a-radio-button> | <a-radio-button :value="2">否</a-radio-button> | ||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="是否公开邮箱" name="email_public" :label-col="{span: 0}"> | |||||
| <a-form-item label="是否公开邮箱" name="email_public"> | |||||
| <a-radio-group v-model:value="createForm.email_public" button-style="solid"> | <a-radio-group v-model:value="createForm.email_public" button-style="solid"> | ||||
| <a-radio-button :value="1">是</a-radio-button> | <a-radio-button :value="1">是</a-radio-button> | ||||
| <a-radio-button :value="2">否</a-radio-button> | <a-radio-button :value="2">否</a-radio-button> | ||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="是否公开传真" name="fax_public" :label-col="{span: 0}"> | |||||
| <a-form-item label="是否公开传真" name="fax_public" > | |||||
| <a-radio-group v-model:value="createForm.fax_public" button-style="solid"> | <a-radio-group v-model:value="createForm.fax_public" button-style="solid"> | ||||
| <a-radio-button :value="1">是</a-radio-button> | <a-radio-button :value="1">是</a-radio-button> | ||||
| <a-radio-button :value="2">否</a-radio-button> | <a-radio-button :value="2">否</a-radio-button> | ||||
| <a-input v-model:value="createForm.interview_address" placeholder="请输入面试地址" /> | <a-input v-model:value="createForm.interview_address" placeholder="请输入面试地址" /> | ||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </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-row> | ||||
| </a-col> | </a-col> | ||||
| </a-row> | </a-row> | ||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||
| import { ref, onMounted, computed } from 'vue'; | import { ref, onMounted, computed } from 'vue'; | ||||
| import { GetDictTree } from '@/apis/models'; | |||||
| let createForm : companyListType.addrFormType = ref({ | let createForm : companyListType.addrFormType = ref({ | ||||
| name: '', | |||||
| company_id: 0, | |||||
| contact: '', | contact: '', | ||||
| possession: '', | |||||
| phone: '', | phone: '', | ||||
| phone_public: 2, | |||||
| mobile: '', | mobile: '', | ||||
| mobile_public: 2, | |||||
| email: '', | email: '', | ||||
| email_public: 2, | |||||
| fax: '', | |||||
| fax_public: 2, | |||||
| other_address: '', | |||||
| interview_address: '', | |||||
| }) | }) | ||||
| const sumbitForm = () => { | |||||
| console.log(createForm.value) | |||||
| // PostCompanyEdit(createForm.value).then(res => { | |||||
| // successToast('保存成功'); | |||||
| // resetForm(); | |||||
| // }).catch(err => { | |||||
| // }) | |||||
| } | |||||
| const resetForm = () => { | |||||
| createForm.value = { | |||||
| contact: '', | |||||
| possession: '', | |||||
| phone: '', | |||||
| phone_public: 2, | |||||
| mobile: '', | |||||
| mobile_public: 2, | |||||
| email: '', | |||||
| email_public: 2, | |||||
| fax: '', | |||||
| fax_public: 2, | |||||
| other_address: '', | |||||
| interview_address: '', | |||||
| } | |||||
| } | |||||
| </script> | </script> | ||||
| <style> | <style> | 
| <a-row> | <a-row> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item required label="工作经验"> | <a-form-item required label="工作经验"> | ||||
| <!-- <a-c-select :dict="2021" placeholder="请选择工作经验" @saveSelect="saveExperience"></a-c-select> --> | |||||
| <a-xuanze :dict="2021" placeholder="请选择工作经验" @saveSelect="saveExperience" | |||||
| :select_content="addOtherForm.experience_select"></a-xuanze> | |||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="学历"> | <a-form-item label="学历"> | ||||
| <!-- <a-c-select :dict="2006" placeholder="请选择学历" @saveSelect="saveSchoolDegree"></a-c-select> --> | |||||
| <a-xuanze :dict="2006" placeholder="请选择学历" @saveSelect="saveSchoolDegree" | |||||
| :select_content="addOtherForm.school_degree_select"></a-xuanze> | |||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item required label="职称要求"> | <a-form-item required label="职称要求"> | ||||
| <!-- <a-c-select :dict="2014" placeholder="请选择职称要求" @saveSelect="saveProfelevel"></a-c-select> --> | |||||
| <a-xuanze :dict="2006" placeholder="请选择职称要求" @saveSelect="saveProfelevel" | |||||
| :select_content="addOtherForm.profe_level_select"></a-xuanze> | |||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item required label="技能认证"> | <a-form-item required label="技能认证"> | ||||
| <!-- <a-c-select :dict="2015" placeholder="请选择技能认证" @saveSelect="saveCertification"></a-c-select> --> | |||||
| <a-xuanze :dict="2015" placeholder="请选择技能认证" @saveSelect="saveCertification" | |||||
| :select_content="addOtherForm.certification_select"></a-xuanze> | |||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="语言要求"> | <a-form-item label="语言要求"> | ||||
| <!-- <a-c-select :dict="2007" placeholder="请选择语言要求" @saveSelect="saveLanguage"></a-c-select> --> | |||||
| </a-form-item> | |||||
| <a-xuanze :dict="2007" placeholder="请选择语言要求" @saveSelect="saveLanguage" | |||||
| :select_content="addOtherForm.language_select"></a-xuanze> | |||||
| </a-form-item> | |||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="掌握程度"> | <a-form-item label="掌握程度"> | ||||
| <!-- <a-c-select :dict="2008" placeholder="请选择掌握程度" @saveSelect="saveLanguageDegree"></a-c-select> --> | |||||
| <a-xuanze :dict="2007" placeholder="请选择掌握程度" @saveSelect="saveLanguageDegree" | |||||
| :select_content="addOtherForm.language_degree_select"></a-xuanze> | |||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-radio-button :value="2">未婚</a-radio-button> | <a-radio-button :value="2">未婚</a-radio-button> | ||||
| <a-radio-button :value="3">不限</a-radio-button> | <a-radio-button :value="3">不限</a-radio-button> | ||||
| </a-radio-group> | </a-radio-group> | ||||
| <!-- <a-c-select :dict="2011" placeholder="请选择婚姻状况" @saveSelect="saveMandarinStatus"></a-c-select> --> | |||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="证书要求" :label-col="{span: 0}"> | |||||
| <a-checkbox-group v-model:value="createForm.license" @change="licenseChange"> | |||||
| <template v-for="(item, index) in licenseOption"> | |||||
| <a-checkbox :value="item.id">{{item.name}}</a-checkbox> | |||||
| </template> | |||||
| <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-checkbox-group> | ||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="籍贯要求" name="mandarin"> | <a-form-item label="籍贯要求" name="mandarin"> | ||||
| <!-- <a-c-cascader :dict="2009" @saveCascader="compantJiguanSave" placeholder="请选择籍贯" | |||||
| :cascader_content="addOtherForm.company_jiguan_cascader"></a-c-cascader> --> | |||||
| <a-jilian :dict="2009" @saveCascader="compantJiguanSave" placeholder="请选择籍贯" | |||||
| :cascader_content="addOtherForm.company_jiguan_cascader"></a-jilian> | |||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="所在地要求" name="mandarin"> | <a-form-item label="所在地要求" name="mandarin"> | ||||
| <!-- <a-c-cascader :dict="2009" @saveCascader="compantSuozaidiSave" placeholder="请选择所在地" | |||||
| :cascader_content="addOtherForm.company_suozaidi_cascader"></a-c-cascader> --> | |||||
| <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-form-item> | ||||
| </a-col> | </a-col> | ||||
| </a-row> | </a-row> | ||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||
| import { ref, onMounted, computed } from 'vue'; | 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({ | let createForm : companyListType.addrFormType = ref({ | ||||
| name: '', | |||||
| company_id: 0, | |||||
| contact: '', | |||||
| phone: '', | |||||
| mobile: '', | |||||
| email: '', | |||||
| 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> | </script> | ||||
| <style> | <style> | 
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item required label="职位类别"> | <a-form-item required label="职位类别"> | ||||
| <a-tree-select v-model:value="value" style="width: 100%" :tree-data="jobTypeData" | |||||
| tree-checkable allow-clear :show-checked-strategy="SHOW_PARENT" | |||||
| <a-tree-select v-model:value="addOtherForm.job_type" style="width: 100%" | |||||
| :tree-data="jobTypeData" tree-checkable allow-clear :show-checked-strategy="SHOW_PARENT" | |||||
| placeholder="职位类别(最多三个,多选只取前三)" tree-node-filter-prop="label" | placeholder="职位类别(最多三个,多选只取前三)" tree-node-filter-prop="label" | ||||
| :fieldNames="jobTypeFieldNames" :maxTagCount="3" @change="jobTypeChange" /> | :fieldNames="jobTypeFieldNames" :maxTagCount="3" @change="jobTypeChange" /> | ||||
| </a-form-item> | </a-form-item> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item required label="工作区域"> | <a-form-item required label="工作区域"> | ||||
| <a-row gutter="20"> | <a-row gutter="20"> | ||||
| <a-tree-select v-model:value="value" style="width: 100%" :tree-data="jobAddressData" | |||||
| tree-checkable allow-clear :show-checked-strategy="SHOW_PARENT" | |||||
| placeholder="工作区域(最多三个,多选只取前三)" tree-node-filter-prop="label" | |||||
| :fieldNames="jobAddressFieldNames" :maxTagCount="3" @change="jobAddressChange" /> | |||||
| <a-tree-select v-model:value="addOtherForm.job_address" style="width: 100%" | |||||
| :tree-data="jobAddressData" tree-checkable allow-clear | |||||
| :show-checked-strategy="SHOW_PARENT" placeholder="工作区域(最多三个,多选只取前三)" | |||||
| tree-node-filter-prop="label" :fieldNames="jobAddressFieldNames" :maxTagCount="3" | |||||
| @change="jobAddressChange" /> | |||||
| </a-row> | </a-row> | ||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item label="职位性质"> | <a-form-item label="职位性质"> | ||||
| <a-radio-group v-model:value="createForm.member_type" button-style="solid"> | |||||
| <a-radio-group v-model:value="addOtherForm.job_nature" button-style="solid" | |||||
| @change="jobNatureChange"> | |||||
| <a-radio-button :value="1">全职</a-radio-button> | <a-radio-button :value="1">全职</a-radio-button> | ||||
| <a-radio-button :value="2">兼职</a-radio-button> | <a-radio-button :value="2">兼职</a-radio-button> | ||||
| <a-radio-button :value="3">临时</a-radio-button> | <a-radio-button :value="3">临时</a-radio-button> | ||||
| </a-radio-group> | </a-radio-group> | ||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <!-- <a-col span="24"> | |||||
| <a-form-item label="是否全职" name="fulltime"> | |||||
| <a-radio-group v-model:value="createForm.fulltime" 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 label="是否兼职" name="parttime"> | |||||
| <a-radio-group v-model:value="createForm.parttime" 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 label="是否临时" name="casual"> | |||||
| <a-radio-group v-model:value="createForm.casual" 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 label="是否实习" name="practical"> | |||||
| <a-radio-group v-model:value="createForm.practical" 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 label="校园招聘" name="campus"> | |||||
| <a-radio-group v-model:value="createForm.campus" 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-col span="24"> | ||||
| <a-form-item required label="食宿要求"> | <a-form-item required label="食宿要求"> | ||||
| <a-xuanze :dict="2016" placeholder="请选择食宿要求" @saveSelect="saveShisu" | <a-xuanze :dict="2016" placeholder="请选择食宿要求" @saveSelect="saveShisu" | ||||
| :select_content="addOtherForm.company_scale_cascader"></a-xuanze> | |||||
| <!-- <a-c-select :dict="2016" placeholder="请选择食宿要求" @saveSelect="saveShisu"></a-c-select> --> | |||||
| :select_content="addOtherForm.shisu_select"></a-xuanze> | |||||
| </a-form-item> | </a-form-item> | ||||
| </a-col> | </a-col> | ||||
| <a-col span="24"> | <a-col span="24"> | ||||
| <a-form-item required label="节假日休息情况"> | <a-form-item required label="节假日休息情况"> | ||||
| <a-xuanze :dict="2017" placeholder="请选择节假日休息情况" @saveSelect="saveHolidays" | <a-xuanze :dict="2017" placeholder="请选择节假日休息情况" @saveSelect="saveHolidays" | ||||
| :select_content="addOtherForm.company_scale_cascader"></a-xuanze> | |||||
| <!-- <a-c-select :dict="2017" placeholder="请选择节假日休息情况" @saveSelect="saveHolidays"></a-c-select> --> | |||||
| :select_content="addOtherForm.holidays_select"></a-xuanze> | |||||
| </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-form-item> | ||||
| </a-col> | </a-col> | ||||
| </a-row> | </a-row> | ||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||
| import { ref, onMounted, computed } from 'vue'; | import { ref, onMounted, computed } from 'vue'; | ||||
| import { GetDictTree, PostCompanyDepartmentList } from '@/apis/models'; | import { GetDictTree, PostCompanyDepartmentList } from '@/apis/models'; | ||||
| import { TreeSelect } from 'ant-design-vue'; | |||||
| import dayjs from 'dayjs'; | |||||
| import 'dayjs/locale/zh-cn'; | |||||
| dayjs.locale('zh-cn'); | |||||
| const dayjsRef = ref(dayjs); | |||||
| const options = ref({ | |||||
| debug: 'info', | |||||
| modules: { | |||||
| }, | |||||
| placeholder: '请输入企业简介' | |||||
| }) | |||||
| let createForm : companyListType.addrFormType = ref({ | let createForm : companyListType.addrFormType = ref({ | ||||
| company_id: 0, | |||||
| urgent: 2, | urgent: 2, | ||||
| name: '', | |||||
| department_id: 0, | department_id: 0, | ||||
| name: '', | |||||
| invite_count: '', | invite_count: '', | ||||
| job_type: [], | job_type: [], | ||||
| job_location: [], | job_location: [], | ||||
| describe_text: '', | describe_text: '', | ||||
| pay_range: 0, | pay_range: 0, | ||||
| key_word: '', | |||||
| useful_life: 0, | useful_life: 0, | ||||
| disabled_date: '', | disabled_date: '', | ||||
| key_word: '', | |||||
| fulltime: 2, | fulltime: 2, | ||||
| parttime: 2, | parttime: 2, | ||||
| casual: 2, | casual: 2, | ||||
| campus: 2, | campus: 2, | ||||
| shisu: 0, | shisu: 0, | ||||
| holidays: 0, | holidays: 0, | ||||
| 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, | |||||
| contact: '', | |||||
| possession: '', | |||||
| phone: '', | |||||
| phone_public: 2, | |||||
| mobile: '', | |||||
| mobile_public: 2, | |||||
| email: '', | |||||
| email_public: 2, | |||||
| fax: '', | |||||
| fax_public: 2, | |||||
| other_address: '', | |||||
| interview_address: '', | |||||
| }) | }) | ||||
| let addOtherForm = ref<companyListType.addOtherFormType>({ | |||||
| company_industry1_cascader: '', | |||||
| company_industry2_cascader: '', | |||||
| company_industry3_cascader: '', | |||||
| company_location1_cascader: '', | |||||
| company_location2_cascader: '', | |||||
| company_location3_cascader: '', | |||||
| company_location4_cascader: '', | |||||
| company_location5_cascader: '', | |||||
| let addOtherForm = ref({ | |||||
| describe_content: '', | describe_content: '', | ||||
| daoqi_date: '', | daoqi_date: '', | ||||
| company_jiguan_cascader: '', | |||||
| company_suozaidi_cascader: '', | |||||
| job_nature: '', | |||||
| job_type: [], | |||||
| job_address: [], | |||||
| shisu_select: '', | |||||
| holidays_select: '', | |||||
| }) | }) | ||||
| const jobTypeFieldNames = ref({ label: 'name', value: 'id', children: 'children' }); | const jobTypeFieldNames = ref({ label: 'name', value: 'id', children: 'children' }); | ||||
| let jobAddressData = ref<Object[]>([]) | let jobAddressData = ref<Object[]>([]) | ||||
| const jobAddressFieldNames = ref({ label: 'name', value: 'id', children: 'children' }); | const jobAddressFieldNames = ref({ label: 'name', value: 'id', children: 'children' }); | ||||
| const SHOW_PARENT = TreeSelect.SHOW_ALL; | |||||
| onMounted(() => { | onMounted(() => { | ||||
| GetDictTree({ | GetDictTree({ | ||||
| code: 2004 | code: 2004 | ||||
| const departmentChange = (val : Object) => { | const departmentChange = (val : Object) => { | ||||
| createForm.value.department_id = val.key; | createForm.value.department_id = val.key; | ||||
| } | } | ||||
| // 职位类别 | // 职位类别 | ||||
| const jobTypeChange = (val) => { | const jobTypeChange = (val) => { | ||||
| createForm.value.job_type = val.slice(0, 3); | |||||
| } | } | ||||
| // 工作区域 | // 工作区域 | ||||
| const jobAddressChange = (val) => { | const jobAddressChange = (val) => { | ||||
| createForm.value.job_location = val.slice(0, 4); | |||||
| } | } | ||||
| // 职位描述 | // 职位描述 | ||||
| const onEditorDescribeUpdate = (data) => { | const onEditorDescribeUpdate = (data) => { | ||||
| createForm.value.describe_text = data | createForm.value.describe_text = data | ||||
| } | } | ||||
| // 薪资范围 | // 薪资范围 | ||||
| const savePayRange = (data) => { | const savePayRange = (data) => { | ||||
| createForm.value.pay_range = data.val; | createForm.value.pay_range = data.val; | ||||
| } | } | ||||
| // 到期日期 | // 到期日期 | ||||
| const disabledDateChange = (val) => { | const disabledDateChange = (val) => { | ||||
| createForm.value.disabled_date = dayjsRef.value(val).format('YYYY-MM-DD'); | createForm.value.disabled_date = dayjsRef.value(val).format('YYYY-MM-DD'); | ||||
| console.log(createForm.value.disabled_date) | |||||
| } | |||||
| const jobNatureChange = (val) => { | |||||
| switch (val.target.value) { | |||||
| case 1: | |||||
| createForm.value.fulltime = 1; | |||||
| createForm.value.parttime = 2; | |||||
| createForm.value.casual = 2; | |||||
| createForm.value.practical = 2; | |||||
| createForm.value.campus = 2; | |||||
| break; | |||||
| case 2: | |||||
| createForm.value.fulltime = 2; | |||||
| createForm.value.parttime = 1; | |||||
| createForm.value.casual = 2; | |||||
| createForm.value.practical = 2; | |||||
| createForm.value.campus = 2; | |||||
| break; | |||||
| case 3: | |||||
| createForm.value.fulltime = 2; | |||||
| createForm.value.parttime = 2; | |||||
| createForm.value.casual = 1; | |||||
| createForm.value.practical = 2; | |||||
| createForm.value.campus = 2; | |||||
| break; | |||||
| case 4: | |||||
| createForm.value.fulltime = 2; | |||||
| createForm.value.parttime = 2; | |||||
| createForm.value.casual = 2; | |||||
| createForm.value.practical = 1; | |||||
| createForm.value.campus = 2; | |||||
| break; | |||||
| case 5: | |||||
| createForm.value.fulltime = 2; | |||||
| createForm.value.parttime = 2; | |||||
| createForm.value.casual = 2; | |||||
| createForm.value.practical = 2; | |||||
| createForm.value.campus = 1; | |||||
| break; | |||||
| } | |||||
| } | } | ||||
| // 食宿要求 | // 食宿要求 | ||||
| const saveShisu = (data) => { | const saveShisu = (data) => { | ||||
| createForm.value.shisu = data.val; | createForm.value.shisu = data.val; | ||||
| } | } | ||||
| // 节假日要求 | // 节假日要求 | ||||
| const saveHolidays = (data) => { | const saveHolidays = (data) => { | ||||
| createForm.value.holidays = data.val; | createForm.value.holidays = data.val; | ||||
| } | } | ||||
| const sumbitForm = () => { | |||||
| console.log(createForm.value) | |||||
| // PostCompanyEdit(createForm.value).then(res => { | |||||
| // successToast('保存成功'); | |||||
| // resetForm(); | |||||
| // }).catch(err => { | |||||
| // }) | |||||
| } | |||||
| const resetForm = () => { | |||||
| createForm.value = { | |||||
| describe_content: '', | |||||
| daoqi_date: '', | |||||
| job_nature: '', | |||||
| job_type: [], | |||||
| job_address: [], | |||||
| shisu_select: '', | |||||
| holidays_select: '', | |||||
| } | |||||
| createForm.value = { | |||||
| urgent: 2, | |||||
| department_id: 0, | |||||
| name: '', | |||||
| invite_count: '', | |||||
| job_type: [], | |||||
| job_location: [], | |||||
| describe_text: '', | |||||
| pay_range: 0, | |||||
| useful_life: 0, | |||||
| disabled_date: '', | |||||
| key_word: '', | |||||
| fulltime: 2, | |||||
| parttime: 2, | |||||
| casual: 2, | |||||
| practical: 2, | |||||
| campus: 2, | |||||
| shisu: 0, | |||||
| holidays: 0, | |||||
| } | |||||
| } | |||||
| </script> | </script> | ||||
| <style> | <style> |