| @@ -30,19 +30,22 @@ export const PostCompanyProbationList = getModel(url.CompanyProbationList); // | |||
| export const PostCompanyFamousList = getModel(url.CompanyFamousList); // 知名企业/推荐企业 | |||
| // 用户管理 | |||
| export const PostCompanyFee = getModel(url.CompanyFee); // 费用管理 | |||
| export const GetCompanyFee = getModel(url.CompanyFee); // 费用管理 | |||
| export const PostCompanyPwdEdit = postModel(url.CompanyPwdEdit); // 修改密码 | |||
| export const PostCompanyEmailEdit = postModel(url.CompanyEmailEdit); // 修改邮箱 | |||
| // 职位管理 | |||
| export const PostCompanyJobAdd = getModel(url.CompanyJobAdd); // 添加职位 | |||
| export const PostCompanyJobAdd = postModel(url.CompanyJobAdd); // 添加职位 | |||
| export const PostCompanyJobEdit = postModel(url.CompanyJobEdit); // 编辑职位 | |||
| export const PostCompanyJobList = getModel(url.CompanyJobList); // 企业职位列表 | |||
| export const PostCompanyJobInfo = getModel(url.CompanyJobInfo); // 职位信息 | |||
| export const GetCompanyJobInfo = getModel(url.CompanyJobInfo); // 职位信息 | |||
| export const PostCompanyJobDel = postModel(url.CompanyJobDel); // 职位删除 | |||
| export const PostCompanyJobRecycle= postModel(url.CompanyJobRecycle); // 职位放到回收站 | |||
| // 部门管理 | |||
| export const PostCompanyDepartmentAdd = postModel(url.CompanyDepartmentAdd); // 新增部门 | |||
| export const PostCompanyDepartmentEdit = postModel(url.CompanyDepartmentEdit); // 编辑部门 | |||
| export const PostCompanyDepartmentList = postModel(url.CompanyDepartmentList); // 部门列表 | |||
| export const GetCompanyDepartmentList = getModel(url.CompanyDepartmentList); // 部门列表 | |||
| export const PostCompanyDepartmentDel = postModel(url.CompanyDepartmentDel); // 部门删除 | |||
| export const PostCompanyRecrBookList = getModel(url.CompanyRecrBookList); // 已预定招聘会列表 | |||
| @@ -35,6 +35,8 @@ declare namespace urlType { | |||
| CompanyJobEdit : String, | |||
| CompanyJobList : String, | |||
| CompanyJobInfo : String, | |||
| CompanyJobDel: String, | |||
| CompanyJobRecycle: String, | |||
| // 部门管理 | |||
| CompanyDepartmentAdd : String, | |||
| CompanyDepartmentEdit : String, | |||
| @@ -38,6 +38,8 @@ export const url : urlType.url = { | |||
| CompanyJobEdit: web + '/company/job_edit', // 编辑职位 | |||
| CompanyJobList: web + '/company/job_list', // 企业职位列表 | |||
| CompanyJobInfo: web + '/company/job_info', // 职位信息 | |||
| CompanyJobDel: web + '/company/job_del', // 职位删除 | |||
| CompanyJobRecycle: web + '/company/job_recycle', // 职位放到回收站 | |||
| // 部门管理 | |||
| CompanyDepartmentAdd: web + '/company/department_add', // 新增部门 | |||
| CompanyDepartmentEdit: web + '/company/department_edit', // 编辑部门 | |||
| @@ -61,7 +61,7 @@ | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed } from 'vue'; | |||
| import { PostCompanyDepartmentAdd, PostCompanyDepartmentList, PostCompanyDepartmentDel } from '@/apis/models'; | |||
| import { PostCompanyDepartmentAdd, GetCompanyDepartmentList, PostCompanyDepartmentDel } from '@/apis/models'; | |||
| import ASearch from '@/components/company/department/search.vue'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/components/company/department/columns'; | |||
| @@ -103,7 +103,7 @@ | |||
| const getData = async () => { | |||
| try { | |||
| loading.value = true; | |||
| let res = await PostCompanyDepartmentList(); | |||
| let res = await GetCompanyDepartmentList(); | |||
| loading.value = false; | |||
| commomParams.value.table.data = res.data.rows; | |||
| commomParams.value.table.columns = cols; | |||
| @@ -31,6 +31,7 @@ | |||
| }) | |||
| const emit = defineEmits(); | |||
| const parentChange = (val, selectedOptions) => { | |||
| console.log(val) | |||
| emit('saveCascader', {arr1: val, arr2: selectedOptions}); | |||
| } | |||
| </script> | |||
| @@ -1,6 +1,6 @@ | |||
| <template> | |||
| <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 v-model:value="selectValue" @change="handleChange" :placeholder="placeholder" label-in-value> | |||
| <a-select-option v-for="item in listOptions" :key="item.id" :value="item.id" :label="item.name">{{item.name}}</a-select-option> | |||
| </a-select> | |||
| </template> | |||
| @@ -11,7 +11,6 @@ | |||
| let listOptions = ref([]); | |||
| let selectValue = ref<String>(props.select_content); | |||
| let placeholder = ref<String>(props.placeholder); | |||
| console.log(props.placeholder) | |||
| watch(() => [props.dict, props.select_content], | |||
| (newVal:string, oldVal:string) => { | |||
| GetDictTree({ | |||
| @@ -19,8 +18,8 @@ | |||
| }).then((res:object) => { | |||
| listOptions.value = res.data.dicts | |||
| }) | |||
| selectValue.value = newVal[1]; | |||
| }) | |||
| selectValue.value = newVal[1] == 0 ? props.placeholder : newVal[1] ; | |||
| }, { immediate: true }) | |||
| onMounted(() => { | |||
| GetDictTree({ | |||
| @@ -7,33 +7,33 @@ export const cols = <ColType.type[]>[ | |||
| }, | |||
| { | |||
| title: '所属部门', | |||
| dataIndex: 'age', | |||
| key: 'age', | |||
| dataIndex: 'department_name', | |||
| key: 'department_name', | |||
| }, | |||
| { | |||
| title: '状态', | |||
| dataIndex: 'address', | |||
| key: 'address', | |||
| dataIndex: 'status_text', | |||
| key: 'status_text', | |||
| }, | |||
| { | |||
| title: '招聘时间', | |||
| dataIndex: 'phone', | |||
| key: 'phone', | |||
| dataIndex: 'publish_date', | |||
| key: 'publish_date', | |||
| }, | |||
| { | |||
| title: '浏览数', | |||
| dataIndex: 'email', | |||
| key: 'email', | |||
| dataIndex: 'click_count', | |||
| key: 'click_count', | |||
| }, | |||
| { | |||
| title: '应聘简历(未看)', | |||
| dataIndex: 'email', | |||
| key: 'email', | |||
| dataIndex: 'apply_count_none_view', | |||
| key: 'apply_count_none_view', | |||
| }, | |||
| { | |||
| title: '推荐简历(未看)', | |||
| dataIndex: 'email', | |||
| key: 'email', | |||
| dataIndex: 'recommend_count_none_view', | |||
| key: 'recommend_count_none_view', | |||
| }, | |||
| { | |||
| title: '操作', | |||
| @@ -1,44 +1,58 @@ | |||
| <template> | |||
| <div style="margin: 16px;"> | |||
| <a-search @searchData="searchData" @clearData="clearData" | |||
| :search_params="commomParams.search"></a-search> | |||
| <a-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></a-search> | |||
| </div> | |||
| <a-biaoge :data="commomParams.table.data" :columns="commomParams.table.columns" | |||
| :pagination="commomParams.page" @page="getPage" :loading="loading"> | |||
| <a-biaoge :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page" | |||
| @page="getPage" :loading="loading"> | |||
| <template #default="{ record }"> | |||
| <a-row :gutter="20"> | |||
| <a-col><a-menu @click="handleMenuClick"> | |||
| <a-menu-item key="1"> | |||
| 修改 | |||
| </a-menu-item> | |||
| <a-menu-item key="2"> | |||
| 发布 | |||
| </a-menu-item> | |||
| <a-menu-item key="3"> | |||
| 暂停 | |||
| </a-menu-item> | |||
| <a-menu-item key="3"> | |||
| 删除 | |||
| </a-menu-item> | |||
| <a-menu-item key="3"> | |||
| 放入回收站 | |||
| </a-menu-item> | |||
| <a-menu-item key="3"> | |||
| 查看 | |||
| </a-menu-item> | |||
| </a-menu></a-col> | |||
| <a-col> | |||
| <a-dropdown placement="bottomRight"> | |||
| <template #overlay> | |||
| <a-menu> | |||
| <a-menu-item key="1"> | |||
| <a-button @click="edit(record)">修改</a-button> | |||
| </a-menu-item> | |||
| <a-menu-item key="2"> | |||
| 发布 | |||
| </a-menu-item> | |||
| <a-menu-item key="3"> | |||
| 暂停 | |||
| </a-menu-item> | |||
| <a-menu-item key="3"> | |||
| 删除 | |||
| </a-menu-item> | |||
| <a-menu-item key="3"> | |||
| <a-button @click="putInRecycle(record.id)">放入回收站</a-button> | |||
| </a-menu-item> | |||
| <a-menu-item key="3"> | |||
| 查看 | |||
| </a-menu-item> | |||
| </a-menu> | |||
| </template> | |||
| <a-button> | |||
| 操作 | |||
| <DownOutlined /> | |||
| </a-button> | |||
| </a-dropdown> | |||
| </a-col> | |||
| </a-row> | |||
| </template> | |||
| </a-biaoge> | |||
| </template> | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed } from 'vue'; | |||
| import { PostCompanyJobList } from '@/apis/models'; | |||
| import { ref, onMounted, computed, defineEmits } from 'vue'; | |||
| import { PostCompanyJobList, PostCompanyJobRecycle } from '@/apis/models'; | |||
| import ASearch from '@/components/invite/manage/search.vue'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/components/invite/manage/columns'; | |||
| import { warnToast, successToast } from '@/utils/toastHelper'; | |||
| import { DownOutlined } from '@ant-design/icons-vue'; | |||
| import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; | |||
| import { createVNode } from 'vue'; | |||
| import { Modal } from 'ant-design-vue'; | |||
| const emit = defineEmits(); | |||
| let { commomParams } = useCommon(); | |||
| let loading = ref<Boolean>(true); | |||
| @@ -77,7 +91,7 @@ | |||
| loading.value = true; | |||
| let res = await PostCompanyJobList(); | |||
| loading.value = false; | |||
| commomParams.value.table.data = res.data.rows; | |||
| commomParams.value.table.data = res.data.list; | |||
| commomParams.value.table.columns = cols; | |||
| commomParams.value.page = { | |||
| current: commomParams.value.search.page, | |||
| @@ -92,40 +106,35 @@ | |||
| } | |||
| } | |||
| let createForm : companyListType.addrFormType = ref({ | |||
| name: '', | |||
| contact: '', | |||
| phone: '', | |||
| mobile: '', | |||
| email: '', | |||
| }) | |||
| const saveForm = () => { | |||
| PostCompanyDepartmentAdd(createForm.value).then(res => { | |||
| successToast('保存成功') | |||
| getData() | |||
| resetForm() | |||
| activeKey.value = "1" | |||
| }) | |||
| } | |||
| const resetForm = () => { | |||
| createForm.value = { | |||
| name: '', | |||
| contact: '', | |||
| phone: '', | |||
| mobile: '', | |||
| email: '', | |||
| } | |||
| // 修改 | |||
| const edit = (record : Object) => { | |||
| emit('toEdit', { record: record }) | |||
| } | |||
| const del = (id: number) => { | |||
| commomParams.value.delParam = { id: id }; | |||
| PostCompanyDepartmentDel(commomParams.value.delParam).then(res => { | |||
| successToast('删除成功'); | |||
| getData(); | |||
| }) | |||
| // 放入回收站 | |||
| const putInRecycle = (id) => { | |||
| Modal.confirm({ | |||
| title: '是否要放入回收站', | |||
| icon: createVNode(ExclamationCircleOutlined), | |||
| onOk() { | |||
| PostCompanyJobRecycle({ id: id }).then(res => { | |||
| successToast('已放入回收站') | |||
| }) | |||
| }, | |||
| onCancel() { | |||
| }, | |||
| }); | |||
| } | |||
| // const del = (id : number) => { | |||
| // commomParams.value.delParam = { id: id }; | |||
| // PostCompanyDepartmentDel(commomParams.value.delParam).then(res => { | |||
| // successToast('删除成功'); | |||
| // getData(); | |||
| // }) | |||
| // } | |||
| </script> | |||
| <style scoped lang="less"> | |||
| @@ -1,6 +1,6 @@ | |||
| <template> | |||
| <a-form :model="createForm" :label-col="{span: 8}" labelAlign="right"> | |||
| <a-row gutter="20"> | |||
| <a-row :gutter="20"> | |||
| <a-col span="12"> | |||
| <a-row> | |||
| <a-col span="24"> | |||
| @@ -58,7 +58,7 @@ | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item label="是否公开传真" name="fax_public" > | |||
| <a-form-item label="是否公开传真" name="fax_public"> | |||
| <a-radio-group v-model:value="createForm.fax_public" button-style="solid"> | |||
| <a-radio-button :value="1">是</a-radio-button> | |||
| <a-radio-button :value="2">否</a-radio-button> | |||
| @@ -87,8 +87,12 @@ | |||
| </template> | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed } from 'vue'; | |||
| import { GetDictTree } from '@/apis/models'; | |||
| import { ref, onMounted, computed, watch, defineEmits, defineProps } from 'vue'; | |||
| import { PostCompanyJobAdd, PostCompanyJobEdit } from '@/apis/models'; | |||
| import { warnToast, successToast } from '@/utils/toastHelper'; | |||
| import { intersectionAlike } from '@/utils/dataHelper'; | |||
| const emit = defineEmits(); | |||
| const props = defineProps(['job_detail']); | |||
| let createForm : companyListType.addrFormType = ref({ | |||
| contact: '', | |||
| @@ -105,15 +109,44 @@ | |||
| interview_address: '', | |||
| }) | |||
| const job_id = ref<number>(null); | |||
| watch(() => [props.job_detail], async (newVal : string[], oldVal) => { | |||
| if (newVal[0]) { | |||
| job_id.value = newVal[0].id; | |||
| createForm.value.id = newVal[0].id; | |||
| createForm.value = intersectionAlike(createForm.value, newVal[0]); | |||
| } | |||
| }, { immediate: true }) | |||
| const sumbitForm = () => { | |||
| console.log(createForm.value) | |||
| // PostCompanyEdit(createForm.value).then(res => { | |||
| // successToast('保存成功'); | |||
| // resetForm(); | |||
| // }).catch(err => { | |||
| // }) | |||
| const newObject = { ...JSON.parse(sessionStorage.getItem('first')), ...JSON.parse(sessionStorage.getItem('second')), ...createForm.value } | |||
| console.log(newObject) | |||
| if(!job_id.value) { | |||
| PostCompanyJobAdd(newObject).then(res => { | |||
| successToast('保存成功'); | |||
| sessionStorage.removeItem('first') | |||
| sessionStorage.removeItem('firstOther') | |||
| sessionStorage.removeItem('second') | |||
| sessionStorage.removeItem('secondOther') | |||
| resetForm(); | |||
| }).catch(err => { | |||
| }) | |||
| } else { | |||
| PostCompanyJobEdit(newObject).then(res => { | |||
| successToast('编辑成功'); | |||
| sessionStorage.removeItem('first') | |||
| sessionStorage.removeItem('firstOther') | |||
| sessionStorage.removeItem('second') | |||
| sessionStorage.removeItem('secondOther') | |||
| resetForm(); | |||
| }).catch(err => { | |||
| }) | |||
| } | |||
| emit('saveSuccess') | |||
| } | |||
| const resetForm = () => { | |||
| createForm.value = { | |||
| contact: '', | |||
| @@ -1,18 +1,18 @@ | |||
| <template> | |||
| <a-form :model="createForm" :label-col="{span: 6}" labelAlign="right"> | |||
| <a-row gutter="20"> | |||
| <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> | |||
| :select_content="createForm.experience"></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> | |||
| :select_content="createForm.school_degree"></a-xuanze> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| @@ -26,26 +26,26 @@ | |||
| <a-col span="24"> | |||
| <a-form-item required label="职称要求"> | |||
| <a-xuanze :dict="2006" placeholder="请选择职称要求" @saveSelect="saveProfelevel" | |||
| :select_content="addOtherForm.profe_level_select"></a-xuanze> | |||
| :select_content="createForm.profelevel"></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> | |||
| :select_content="createForm.certification"></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> | |||
| :select_content="createForm.language"></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> | |||
| :select_content="createForm.language_degree"></a-xuanze> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| @@ -121,17 +121,14 @@ | |||
| </template> | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed } from 'vue'; | |||
| import { GetDictTree } from '@/apis/models'; | |||
| import { ref, onMounted, computed, watch, defineEmits, defineProps } from 'vue'; | |||
| import { GetDictTree, PostCompanyJobAdd, alreadyValue } from '@/apis/models'; | |||
| import { warnToast, successToast } from '@/utils/toastHelper'; | |||
| import { intersectionAlike } from '@/utils/dataHelper'; | |||
| const emit = defineEmits(); | |||
| const props = defineProps(['job_detail']); | |||
| 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, | |||
| @@ -155,79 +152,103 @@ | |||
| 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: '', | |||
| company_jiguan_cascader: [], | |||
| company_suozaidi_cascader: [], | |||
| }) | |||
| const job_id = ref<object>(null); | |||
| watch(() => [props.job_detail], async (newVal : string[], oldVal) => { | |||
| let res = await GetDictTree({ code: 2018 }) | |||
| licenseOption.value = res.data.dicts; | |||
| if (newVal[0]) { | |||
| job_id.value = newVal[0].id; | |||
| createForm.value = intersectionAlike(createForm.value, newVal[0]); | |||
| addOtherForm.value = { | |||
| company_jiguan_cascader: [newVal[0].household_province, newVal[0].household_city], | |||
| company_suozaidi_cascader: addToLocationArray(newVal[0]) | |||
| } | |||
| sessionStorage.setItem("second", JSON.stringify(createForm.value)) | |||
| sessionStorage.setItem("secondOther", JSON.stringify(addOtherForm.value)) | |||
| addOtherForm.value = sessionStorage.getItem('secondOther') ? JSON.parse(sessionStorage.getItem('secondOther')) : addOtherForm.value | |||
| createForm.value = sessionStorage.getItem('second') ? JSON.parse(sessionStorage.getItem('second')) : createForm.value | |||
| } | |||
| }, { immediate: true }) | |||
| const addToLocationArray = (data) => { | |||
| let locationArray = []; | |||
| if (data.location_province !== 0) { | |||
| locationArray.push(data.location_province); | |||
| } | |||
| if (data.location_city !== 0) { | |||
| locationArray.push(data.location_city); | |||
| } | |||
| if (data.location_town !== 0) { | |||
| locationArray.push(data.location_town); | |||
| } | |||
| return locationArray; | |||
| } | |||
| onMounted(async () => { | |||
| }) | |||
| // 工作经验 | |||
| const saveExperience = (data) => { | |||
| createForm.value.experience = data.val; | |||
| createForm.value.experience = data.val.key; | |||
| } | |||
| // 学历要求 | |||
| const saveSchoolDegree = (data) => { | |||
| createForm.value.school_degree = data.val; | |||
| createForm.value.school_degree = data.val.key; | |||
| } | |||
| // 职称要求 | |||
| const saveProfelevel = (data) => { | |||
| createForm.value.profelevel = data.val; | |||
| createForm.value.profelevel = data.val.key; | |||
| } | |||
| // 技能认证 | |||
| const saveCertification = (data) => { | |||
| createForm.value.certification = data.val; | |||
| createForm.value.certification = data.val.key; | |||
| } | |||
| // 语言要求 | |||
| const saveLanguage = (data) => { | |||
| createForm.value.language = data.val; | |||
| createForm.value.language = data.val.key; | |||
| } | |||
| // 掌握程度 | |||
| const saveLanguageDegree = (data) => { | |||
| createForm.value.language_degree = data.val; | |||
| createForm.value.language_degree = data.val.key;; | |||
| } | |||
| // 选择籍贯 | |||
| const compantJiguanSave = (data) => { | |||
| addOtherForm.value.company_jiguan_cascader = data.arr1; | |||
| 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) => { | |||
| addOtherForm.value.company_suozaidi_cascader = data.arr1; | |||
| 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 => { | |||
| // }) | |||
| sessionStorage.setItem("second", JSON.stringify(createForm.value)) | |||
| sessionStorage.setItem("secondOther", JSON.stringify(addOtherForm.value)) | |||
| emit('saveSuccess', { key: "3" }) | |||
| } | |||
| 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: '', | |||
| company_jiguan_cascader: '', | |||
| company_suozaidi_cascader: '' | |||
| } | |||
| createForm.value = { | |||
| experience: 0, | |||
| @@ -1,221 +1,49 @@ | |||
| <template> | |||
| <a-tabs v-model:activeKey="activeKey"> | |||
| <a-tab-pane key="1" tab="职位信息"> | |||
| <position-info></position-info> | |||
| <position-info :job_detail="jobDetail" @saveSuccess="saveSuccessInfo"></position-info> | |||
| </a-tab-pane> | |||
| <a-tab-pane key="2" tab="职位要求" force-render> | |||
| <position-demand></position-demand> | |||
| <position-demand :job_detail="jobDetail" @saveSuccess="saveSuccessDemand"></position-demand> | |||
| </a-tab-pane> | |||
| <a-tab-pane key="3" tab="联系方式"> | |||
| <position-contact></position-contact> | |||
| <a-tab-pane key="3" tab="联系方式"> | |||
| <position-contact :job_detail="jobDetail" @saveSuccess="saveSuccessContact"></position-contact> | |||
| </a-tab-pane> | |||
| </a-tabs> | |||
| </template> | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed } from 'vue'; | |||
| import { ref, onMounted, watch, defineProps, defineEmits } from 'vue'; | |||
| import PositionInfo from '@/components/invite/position/info.vue' | |||
| import PositionDemand from '@/components/invite/position/demand.vue' | |||
| import PositionContact from '@/components/invite/position/contact.vue' | |||
| let createForm : companyListType.addrFormType = ref({ | |||
| name: '', | |||
| company_id: 0, | |||
| contact: '', | |||
| phone: '', | |||
| mobile: '', | |||
| email: '', | |||
| }) | |||
| let dataSource = ref([ | |||
| { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, | |||
| { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, | |||
| ]) | |||
| let columns = ref([ | |||
| { | |||
| title: '部门名称', | |||
| dataIndex: 'name', | |||
| key: 'name', | |||
| }, | |||
| { | |||
| title: '联系人', | |||
| dataIndex: 'age', | |||
| key: 'age', | |||
| }, | |||
| { | |||
| title: '联系电话', | |||
| dataIndex: 'address', | |||
| key: 'address', | |||
| }, | |||
| { | |||
| title: '联系手机', | |||
| dataIndex: 'phone', | |||
| key: 'phone', | |||
| }, | |||
| { | |||
| title: '电子邮件', | |||
| dataIndex: 'email', | |||
| key: 'email', | |||
| }, | |||
| { | |||
| title: '操作', | |||
| dataIndex: 'operation', | |||
| slots: { customRender: 'operation' }, | |||
| }, | |||
| ]) | |||
| </script> | |||
| import { GetCompanyJobInfo } from '@/apis/models'; | |||
| const props = defineProps(['job_id']); | |||
| const emit = defineEmits(); | |||
| const jobDetail = ref<object>(null); | |||
| watch(() => [props.job_id], (newVal : string[], oldVal) => { | |||
| if(newVal[0]) { | |||
| GetCompanyJobInfo({id: newVal[0]}).then(res => { | |||
| jobDetail.value = res.data | |||
| }) | |||
| } | |||
| }, { immediate: true }) | |||
| <style scoped lang="less"> | |||
| :deep(.ant-table-thead >tr>th) { | |||
| background-color: #fff !important; | |||
| border: none !important; | |||
| color: #bbb !important; | |||
| } | |||
| :deep(.ant-table-thead >tr>th::before) { | |||
| display: none !important; | |||
| const activeKey = ref<String>('1'); | |||
| const saveSuccessInfo = (data) => { | |||
| activeKey.value = data.key; | |||
| } | |||
| :deep(.ant-table-tbody >tr >td) { | |||
| border: none !important; | |||
| const saveSuccessDemand = (data) => { | |||
| activeKey.value = data.key; | |||
| } | |||
| const saveSuccessContact = () => { | |||
| emit('currentMenuKey', {key : 2}) | |||
| } | |||
| </script> | |||
| <style scoped lang="less"> | |||
| </style> | |||
| @@ -1,6 +1,6 @@ | |||
| <template> | |||
| <a-form :model="createForm" :label-col="{span: 6}" labelAlign="right"> | |||
| <a-row gutter="20"> | |||
| <a-row :gutter="20"> | |||
| <a-col span="12"> | |||
| <a-row> | |||
| <a-col span="24"> | |||
| @@ -13,8 +13,9 @@ | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item label="选择部门" name="department_id"> | |||
| <a-select v-model:value="value" @change="departmentChange" placeholder="请选择部门" show-search | |||
| :filter-option="false" label-in-value @search="departmentSearch"> | |||
| <a-select v-model:value="addOtherForm.department_name" @change="departmentChange" | |||
| placeholder="请进行搜索选择部门" show-search :filter-option="false" label-in-value | |||
| @search="departmentSearch"> | |||
| <a-select-option v-for="item in department_list" :key="item.id" :value="item.id" | |||
| :label="item.name" label-in-value>{{item.name}}</a-select-option> | |||
| </a-select> | |||
| @@ -32,7 +33,7 @@ | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="职位类别"> | |||
| <a-tree-select v-model:value="addOtherForm.job_type" style="width: 100%" | |||
| <a-tree-select v-model:value="createForm.job_type" style="width: 100%" | |||
| :tree-data="jobTypeData" tree-checkable allow-clear :show-checked-strategy="SHOW_PARENT" | |||
| placeholder="职位类别(最多三个,多选只取前三)" tree-node-filter-prop="label" | |||
| :fieldNames="jobTypeFieldNames" :maxTagCount="3" @change="jobTypeChange" /> | |||
| @@ -40,13 +41,11 @@ | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="工作区域"> | |||
| <a-row gutter="20"> | |||
| <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-tree-select v-model:value="createForm.job_location" style="width: 100%" | |||
| :tree-data="jobAddressData" tree-checkable allow-clear | |||
| :show-checked-strategy="SHOW_PARENT" placeholder="工作区域(最多四个,多选只取前四)" | |||
| tree-node-filter-prop="label" :fieldNames="jobAddressFieldNames" :maxTagCount="4" | |||
| @change="jobAddressChange" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| @@ -59,7 +58,7 @@ | |||
| <a-col span="24"> | |||
| <a-form-item label="薪资范围" name="pay_range"> | |||
| <a-xuanze :dict="2005" placeholder="请选择月薪要求范围" @saveSelect="savePayRange" | |||
| :select_content="addOtherForm.company_scale_cascader"></a-xuanze> | |||
| :select_content="addOtherForm.pay_range_cascader"></a-xuanze> | |||
| </a-form-item> | |||
| </a-col> | |||
| @@ -105,8 +104,8 @@ | |||
| </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 required label="操作"> | |||
| <a-button type="primary" block @click="sumbitForm">下一步</a-button> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -116,9 +115,13 @@ | |||
| </template> | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed } from 'vue'; | |||
| import { GetDictTree, PostCompanyDepartmentList } from '@/apis/models'; | |||
| import { ref, onMounted, computed, watch, defineEmits, defineProps } from 'vue'; | |||
| import { GetDictTree, GetCompanyDepartmentList, PostCompanyJobAdd } from '@/apis/models'; | |||
| import { TreeSelect } from 'ant-design-vue'; | |||
| import { warnToast, successToast } from '@/utils/toastHelper'; | |||
| import { intersectionAlike } from '@/utils/dataHelper'; | |||
| const emit = defineEmits(); | |||
| const props = defineProps(['job_detail']); | |||
| import dayjs from 'dayjs'; | |||
| import 'dayjs/locale/zh-cn'; | |||
| dayjs.locale('zh-cn'); | |||
| @@ -129,6 +132,8 @@ | |||
| }, | |||
| placeholder: '请输入企业简介' | |||
| }) | |||
| let createForm : companyListType.addrFormType = ref({ | |||
| urgent: 2, | |||
| department_id: 0, | |||
| @@ -152,14 +157,58 @@ | |||
| let addOtherForm = ref({ | |||
| department_name: '请选择部门', | |||
| describe_content: '', | |||
| daoqi_date: '', | |||
| job_nature: '', | |||
| job_type: [], | |||
| job_address: [], | |||
| pay_range_cascader: '', | |||
| shisu_select: '', | |||
| holidays_select: '', | |||
| }) | |||
| const job_id = ref<object>(null); | |||
| watch(() => [props.job_detail], async (newVal : string[], oldVal) => { | |||
| let res = await GetDictTree({ code: 2004 }); | |||
| jobTypeData.value = res.data.dicts; | |||
| let res1 = await GetDictTree({ code: 2009 }); | |||
| jobAddressData.value = res1.data.dicts; | |||
| if (newVal[0]) { | |||
| job_id.value = newVal[0].id; | |||
| createForm.value = intersectionAlike(createForm.value, newVal[0]); | |||
| addOtherForm.value = { | |||
| department_name: '请选择部门', | |||
| describe_content: newVal[0].describe_text, | |||
| daoqi_date: dayjsRef.value(newVal[0].disabled_date), | |||
| pay_range_cascader: newVal[0].pay_range, | |||
| shisu_select: newVal[0].shisu, | |||
| holidays_select: newVal[0].holidays, | |||
| } | |||
| if(newVal[0].fulltime == 1) { | |||
| addOtherForm.value.job_nature = 1 | |||
| return; | |||
| } else if(newVal[0].parttime == 1) { | |||
| addOtherForm.value.job_nature =2 | |||
| return; | |||
| }else if(newVal[0].casual == 1) { | |||
| addOtherForm.value.job_nature = 3 | |||
| return; | |||
| }else if(newVal[0].practical == 1) { | |||
| addOtherForm.value.job_nature =4 | |||
| return; | |||
| }else if(newVal[0].campus == 1) { | |||
| addOtherForm.value.job_nature = 5 | |||
| return; | |||
| } | |||
| sessionStorage.setItem("first", JSON.stringify(createForm.value)) | |||
| sessionStorage.setItem("firstOther", JSON.stringify(addOtherForm.value)) | |||
| } else { | |||
| addOtherForm.value = sessionStorage.getItem('firstOther') ? JSON.parse(sessionStorage.getItem('firstOther')) : addOtherForm.value | |||
| addOtherForm.value.daoqi_date = addOtherForm.value.daoqi_date ? dayjsRef.value(addOtherForm.value.daoqi_date) : '' | |||
| createForm.value = sessionStorage.getItem('first') ? JSON.parse(sessionStorage.getItem('first')) : createForm.value | |||
| } | |||
| }, { immediate: true }) | |||
| let jobTypeData = ref<Object[]>([]) | |||
| @@ -167,27 +216,19 @@ | |||
| let jobAddressData = ref<Object[]>([]) | |||
| const jobAddressFieldNames = ref({ label: 'name', value: 'id', children: 'children' }); | |||
| const SHOW_PARENT = TreeSelect.SHOW_ALL; | |||
| onMounted(() => { | |||
| GetDictTree({ | |||
| code: 2004 | |||
| }).then(res => { | |||
| jobTypeData.value = res.data.dicts | |||
| }) | |||
| GetDictTree({ | |||
| code: 2009 | |||
| }).then(res => { | |||
| jobAddressData.value = res.data.dicts | |||
| }) | |||
| onMounted(async () => { | |||
| }) | |||
| // 选择部门 | |||
| let department_list = ref<Object[]>([]) | |||
| const departmentSearch = (val) => { | |||
| PostCompanyDepartmentList({ keyword: val }).then(res => { | |||
| department_list.value = res.data.list; | |||
| GetCompanyDepartmentList({ keyword: val }).then(res => { | |||
| department_list.value = res.data.rows; | |||
| }) | |||
| } | |||
| const departmentChange = (val : Object) => { | |||
| addOtherForm.value.department_name = val.option.label; | |||
| createForm.value.department_id = val.key; | |||
| } | |||
| @@ -207,7 +248,8 @@ | |||
| // 薪资范围 | |||
| const savePayRange = (data) => { | |||
| createForm.value.pay_range = data.val; | |||
| addOtherForm.value.pay_range_cascader = data.val.option.label; | |||
| createForm.value.pay_range = data.val.key; | |||
| } | |||
| // 到期日期 | |||
| @@ -258,30 +300,30 @@ | |||
| // 食宿要求 | |||
| const saveShisu = (data) => { | |||
| createForm.value.shisu = data.val; | |||
| console.log(data) | |||
| addOtherForm.value.shisu_select = data.val.option.label; | |||
| createForm.value.shisu = data.val.key; | |||
| } | |||
| // 节假日要求 | |||
| const saveHolidays = (data) => { | |||
| createForm.value.holidays = data.val; | |||
| addOtherForm.value.holidays_select = data.val.option.label; | |||
| createForm.value.holidays = data.val.key; | |||
| } | |||
| const sumbitForm = () => { | |||
| console.log(createForm.value) | |||
| // PostCompanyEdit(createForm.value).then(res => { | |||
| // successToast('保存成功'); | |||
| // resetForm(); | |||
| // }).catch(err => { | |||
| // }) | |||
| sessionStorage.setItem("first", JSON.stringify(createForm.value)) | |||
| sessionStorage.setItem("firstOther", JSON.stringify(addOtherForm.value)) | |||
| emit('saveSuccess', { key: "2" }) | |||
| } | |||
| const resetForm = () => { | |||
| createForm.value = { | |||
| addOtherForm.value = { | |||
| department_name: '请选择部门', | |||
| describe_content: '', | |||
| daoqi_date: '', | |||
| job_nature: '', | |||
| job_type: [], | |||
| job_address: [], | |||
| pay_range_cascader: '', | |||
| shisu_select: '', | |||
| holidays_select: '', | |||
| } | |||
| @@ -57,7 +57,7 @@ | |||
| </a-dropdown> | |||
| </template> | |||
| <template v-else-if="role == 'personal'"> | |||
| <a-button size="small" @click="returnHome" v-if="pageType == 'company'">返回首页</a-button> | |||
| <a-button size="small" @click="returnHome" v-if="pageType == 'personal'">返回首页</a-button> | |||
| <a-dropdown placement="bottomRight"> | |||
| <template #overlay> | |||
| <a-menu @click="handleMenuClick"> | |||
| @@ -172,6 +172,15 @@ | |||
| store.commit('permissions/SET_MENU', []) | |||
| router.push('/manage/home') | |||
| } | |||
| if(val.key == 6) { | |||
| store.commit('getPageType', { | |||
| pageType: 'company' | |||
| }) | |||
| sessionStorage.setItem('pageType', 'company') | |||
| store.commit('permissions/SET_PERMISSION', null) | |||
| store.commit('permissions/SET_MENU', []) | |||
| router.push('/manage/home') | |||
| } | |||
| } | |||
| </script> | |||
| @@ -0,0 +1,47 @@ | |||
| <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 required label="邮箱" name="email"> | |||
| <a-input v-model:value="createForm.email" placeholder="请输入邮箱" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item label="保存"> | |||
| <a-button type="primary" block @click="saveForm">保存</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 { PostCompanyEmailEdit } from '@/apis/models'; | |||
| import { warnToast, successToast } from '@/utils/toastHelper'; | |||
| let createForm : companyListType.addrFormType = ref({ | |||
| email: '' | |||
| }) | |||
| const saveForm = () => { | |||
| PostCompanyEmailEdit(createForm.value).then(res => { | |||
| successToast('修改成功') | |||
| resetForm() | |||
| }) | |||
| } | |||
| const resetForm = () => { | |||
| createForm.value = { | |||
| email: '' | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped lang="less"> | |||
| </style> | |||
| @@ -1,21 +1,29 @@ | |||
| <template> | |||
| <a-row> | |||
| <a-col :span="6"> | |||
| <a-statistic title="总点数" value="10000" style="margin-right: 50px" /> | |||
| <a-statistic title="总点数" :value="feeDetail.total_fee" style="margin-right: 50px" /> | |||
| </a-col> | |||
| <a-col :span="6"> | |||
| <a-statistic title="剩余点数" value="999" /> | |||
| <a-statistic title="剩余点数" :value="feeDetail.balance_fee" /> | |||
| </a-col> | |||
| <a-col :span="6"> | |||
| <a-statistic title="开通日期" value="2012-12-20" /> | |||
| <a-statistic title="开通日期" :value="feeDetail.start_date" /> | |||
| </a-col> | |||
| <a-col :span="6"> | |||
| <a-statistic title="有效期限" value="2012-12-20" /> | |||
| <a-statistic title="有效期限" :value="feeDetail.end_date" /> | |||
| </a-col> | |||
| </a-row> | |||
| </template> | |||
| <script> | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed, watch, defineEmits, defineProps } from 'vue'; | |||
| import { GetCompanyFee } from '@/apis/models'; | |||
| let feeDetail = ref<Object>({}) | |||
| onMounted(() => { | |||
| GetCompanyFee().then(res => { | |||
| feeDetail.value = res.data | |||
| }) | |||
| }) | |||
| </script> | |||
| <style> | |||
| @@ -4,18 +4,23 @@ | |||
| <a-col span="12"> | |||
| <a-row> | |||
| <a-col span="24"> | |||
| <a-form-item required label="登录密码" name="name"> | |||
| <a-input v-model:value="createForm.name" placeholder="请输入登录密码" /> | |||
| <a-form-item required label="旧密码" name="old_password"> | |||
| <a-input v-model:value="createForm.old_password" placeholder="请输入旧密码" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="注册的手机号" name="name"> | |||
| <a-input v-model:value="createForm.name" placeholder="请输入手机号" /> | |||
| <a-form-item required label="新密码" name="new_password"> | |||
| <a-input v-model:value="createForm.new_password" placeholder="请输入新密码" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item required label="确认密码" name="contact"> | |||
| <a-input v-model:value="createForm.contact" placeholder="请输入确认密码" /> | |||
| <a-form-item required label="确认密码" name="comform_password"> | |||
| <a-input v-model:value="createForm.comform_password" placeholder="请输入确认密码" /> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item label="保存"> | |||
| <a-button type="primary" block @click="saveForm">保存</a-button> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -26,205 +31,35 @@ | |||
| <script setup lang="ts"> | |||
| import { ref, onMounted, computed } from 'vue'; | |||
| import { PostCompanyPwdEdit } from '@/apis/models'; | |||
| import { warnToast, successToast } from '@/utils/toastHelper'; | |||
| let createForm : companyListType.addrFormType = ref({ | |||
| name: '', | |||
| company_id: 0, | |||
| contact: '', | |||
| phone: '', | |||
| mobile: '', | |||
| email: '', | |||
| old_password: '', | |||
| new_password: '', | |||
| comform_password: '' | |||
| }) | |||
| const saveForm = () => { | |||
| if(createForm.value.new_password != createForm.value.comform_password) { | |||
| warnToast('新密码和确认密码不一致') | |||
| return false; | |||
| } | |||
| PostCompanyPwdEdit(createForm.value).then(res => { | |||
| successToast('修改成功,请重新登录') | |||
| resetForm() | |||
| }) | |||
| } | |||
| const resetForm = () => { | |||
| createForm.value = { | |||
| old_password: '', | |||
| new_password: '', | |||
| comform_password: '' | |||
| } | |||
| } | |||
| let dataSource = ref([ | |||
| { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, | |||
| { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, { | |||
| key: '1', | |||
| name: '第一部部门第一部部门第一部部门', | |||
| age: '王二狗', | |||
| address: '082-12331231', | |||
| phone: '1223245645646', | |||
| email: '6146545@126.com', | |||
| }, | |||
| ]) | |||
| let columns = ref([ | |||
| { | |||
| title: '部门名称', | |||
| dataIndex: 'name', | |||
| key: 'name', | |||
| }, | |||
| { | |||
| title: '联系人', | |||
| dataIndex: 'age', | |||
| key: 'age', | |||
| }, | |||
| { | |||
| title: '联系电话', | |||
| dataIndex: 'address', | |||
| key: 'address', | |||
| }, | |||
| { | |||
| title: '联系手机', | |||
| dataIndex: 'phone', | |||
| key: 'phone', | |||
| }, | |||
| { | |||
| title: '电子邮件', | |||
| dataIndex: 'email', | |||
| key: 'email', | |||
| }, | |||
| { | |||
| title: '操作', | |||
| dataIndex: 'operation', | |||
| slots: { customRender: 'operation' }, | |||
| }, | |||
| ]) | |||
| </script> | |||
| <style scoped lang="less"> | |||
| :deep(.ant-table-thead >tr>th) { | |||
| background-color: #fff !important; | |||
| border: none !important; | |||
| color: #bbb !important; | |||
| } | |||
| :deep(.ant-table-thead >tr>th::before) { | |||
| display: none !important; | |||
| } | |||
| :deep(.ant-table-tbody >tr >td) { | |||
| border: none !important; | |||
| } | |||
| </style> | |||
| @@ -1,52 +1,56 @@ | |||
| export const findidx : Function = (arr: any, val: any) => { | |||
| export const findidx : Function = (arr : any, val : any) => { | |||
| return arr.findIndex(item => { | |||
| return item.id === val | |||
| return item.id === val | |||
| }) | |||
| } | |||
| export const intersectionAlike : Function = (objA: any, objB: any) => { | |||
| export const intersectionAlike : Function = (objA : any, objB : any) => { | |||
| const result = {}; | |||
| for (const keyA in objA) { | |||
| if (objB.hasOwnProperty(keyA)) { | |||
| result[keyA] = objB[keyA]; | |||
| } | |||
| if (objB.hasOwnProperty(keyA)) { | |||
| if (Array.isArray(objB[keyA])) { | |||
| result[keyA] = [...objB[keyA]]; // 使用扩展运算符创建数组的副本 | |||
| } else { | |||
| result[keyA] = objB[keyA]; | |||
| } | |||
| } | |||
| } | |||
| return result; | |||
| } | |||
| export const hasValue : Function = (obj: any) => { | |||
| export const hasValue : Function = (obj : any) => { | |||
| let result = ''; | |||
| result = Object.keys(obj).filter(key => obj[key] !== 0).map(key => `${obj[key]}`).join('') | |||
| return result; | |||
| } | |||
| export const divObj : Function = (obj: any) => { | |||
| export const divObj : Function = (obj : any) => { | |||
| const result = [] | |||
| obj.reduce((acc, curr, index) => { | |||
| curr.idx = index; | |||
| result.push(curr) | |||
| // const key = `node${index}Info`; | |||
| // acc[key] = curr; | |||
| // return acc; | |||
| curr.idx = index; | |||
| result.push(curr) | |||
| // const key = `node${index}Info`; | |||
| // acc[key] = curr; | |||
| // return acc; | |||
| }, {}); | |||
| return result; | |||
| } | |||
| export const alreadyValue: Function = (obj: any) => { | |||
| const result = [] | |||
| obj.reduce((acc, curr, index) => { | |||
| curr.idx = index; | |||
| result.push(curr) | |||
| // const key = `node${index}Info`; | |||
| // acc[key] = curr; | |||
| // return acc; | |||
| }, {}); | |||
| export const alreadyValue : Function = (obj : any) => { | |||
| const result = [] | |||
| obj.reduce((acc, curr, index) => { | |||
| curr.idx = index; | |||
| result.push(curr) | |||
| // const key = `node${index}Info`; | |||
| // acc[key] = curr; | |||
| // return acc; | |||
| }, {}); | |||
| return result; | |||
| return result; | |||
| } | |||
| @@ -4,13 +4,13 @@ | |||
| <a-col span="18"> | |||
| <a-row> | |||
| <a-col span="4"> | |||
| <common-left-sider :menu_list="menu_list" :selected_key="[1]" | |||
| <common-left-sider :menu_list="menu_list" v-model:selectedKeys="selectedKeys" | |||
| @changeKey="changeKey"></common-left-sider> | |||
| </a-col> | |||
| <a-col span="20"> | |||
| <div style="width: 100%;background-color: #fff;padding: 10px;"> | |||
| <invite-position v-if="curKey == 1"></invite-position> | |||
| <invite-manage v-if="curKey == 2"></invite-manage> | |||
| <invite-position :job_id="job_id" v-if="curKey == 1" @currentMenuKey="currentMenuKey"></invite-position> | |||
| <invite-manage v-if="curKey == 2" @toEdit="toEdit"></invite-manage> | |||
| <invite-recycle v-if="curKey == 3"></invite-recycle> | |||
| </div> | |||
| </a-col> | |||
| @@ -25,12 +25,23 @@ | |||
| import InvitePosition from '@/components/invite/position/index.vue' | |||
| import InviteManage from '@/components/invite/manage/index.vue' | |||
| import InviteRecycle from '@/components/invite/recycle/index.vue' | |||
| let companyList = ref<object[]>([{}, {}, {}, {}, {}, {}]) | |||
| let menu_list = ref([{ name: '发布招聘', key: 1 }, { name: '招聘职位管理', key: 2 }, { name: '招聘回收站', key: 3 }]) | |||
| let curKey = ref<Number>(1) | |||
| let selectedKeys = ref<Number[]>([1]) | |||
| const changeKey = (data) => { | |||
| curKey.value = data.key; | |||
| } | |||
| let job_id = ref<Number>(0) | |||
| const toEdit = (data) => { | |||
| curKey.value = 1; | |||
| console.log(data.record.id) | |||
| job_id.value = data.record.id | |||
| } | |||
| const currentMenuKey = (data) => { | |||
| curKey.value = 2; | |||
| selectedKeys.value = [2] | |||
| } | |||
| </script> | |||
| <style> | |||
| @@ -11,6 +11,7 @@ | |||
| <div style="width: 100%;background-color: #fff;padding: 10px;"> | |||
| <user-expense v-if="curKey == 1"></user-expense> | |||
| <user-password v-if="curKey == 2"></user-password> | |||
| <user-password v-if="curKey == 3"></user-password> | |||
| </div> | |||
| </a-col> | |||
| </a-row> | |||
| @@ -24,7 +25,7 @@ | |||
| import UserExpense from '@/components/user/expense/index.vue' | |||
| import UserPassword from '@/components/user/password/index.vue' | |||
| let companyList = ref<object[]>([{}, {}, {}, {}, {}, {}]) | |||
| let menu_list = ref([{ name: '费用管理', key: 1 },{ name: '修改登录密码', key: 2}]) | |||
| let menu_list = ref([{ name: '费用管理', key: 1 },{ name: '修改登录密码', key: 2},{ name: '修改邮箱', key: 3}]) | |||
| let curKey = ref<Number>(1) | |||
| const changeKey = (data) => { | |||
| curKey.value = data.key; | |||