|
@@ -1,281 +1,275 @@
|
|
|
<template>
|
|
|
<div class="card-edit">
|
|
|
- <a-form :model="dataModel" autocomplete="off" @finish="onFinish">
|
|
|
- <a-divider orientation="left">岗位信息管理</a-divider>
|
|
|
-
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="岗位名称"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="postName"
|
|
|
- :rules="[{ required: true, message: '请输入岗位名称!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.postName" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="有效开始时间"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="validTime"
|
|
|
- :rules="[{ required: true, message: '请输入招聘有效开始时间' }]"
|
|
|
- >
|
|
|
- <a-date-picker
|
|
|
- v-model:value="dataModel.validTime"
|
|
|
- picker="date"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="有效期(天)"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="validDay"
|
|
|
- :rules="[{ required: true, message: '请输入有效期(天)!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.validDay" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
-
|
|
|
-
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="岗位状态"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="recordStatus"
|
|
|
- :rules="[{ required: true, message: '请岗位状态!' }]"
|
|
|
- >
|
|
|
- <a-select
|
|
|
- ref="select"
|
|
|
- v-model:value="dataModel.recordStatus"
|
|
|
- :options="postStatusList"
|
|
|
- :field-names="{ label: 'name', value: 'value' }"
|
|
|
- >
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
+ <!-- <a-divider orientation="left">关联企业信息</a-divider>-->
|
|
|
+ <a-form :model="postCompany" autocomplete="off">
|
|
|
+ <h1>关联企业信息</h1>
|
|
|
+ <a-row>
|
|
|
+ <a-col flex="800px">
|
|
|
<a-form-item
|
|
|
- label="所属企业"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="companyID"
|
|
|
- :rules="[{ required: true, message: '请选择企业!' }]"
|
|
|
+ label="企业名称"
|
|
|
+ :label-col="{ span: 3}"
|
|
|
+ name="companyId"
|
|
|
+ :rules="[{ required: true, message: '请输入企业名称!' }]"
|
|
|
>
|
|
|
<a-select
|
|
|
ref="select"
|
|
|
- v-model:value="dataModel.companyID"
|
|
|
- :options="companyList"
|
|
|
- :field-names="{ label: 'companyName', value: 'companyID' }"
|
|
|
+ show-search optionFilterProp="label"
|
|
|
+ v-model:value="postCompany.companyId"
|
|
|
>
|
|
|
+ <a-select-option v-for="item in companyList" :label="item.companyName" :value="item.companyID"
|
|
|
+ :key="item.companyID">
|
|
|
+ <span>{{ item.companyName }}</span>
|
|
|
+ </a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="工作性质"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="workNature"
|
|
|
- :rules="[{ required: true, message: '请输入工作性质!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.workNature" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
</a-row>
|
|
|
+ </a-form>
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="2">
|
|
|
+ <h1>岗位管理</h1>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="22" style="text-align: right;">
|
|
|
+ <Space>
|
|
|
+ <a-button @click="addPost">
|
|
|
+ <template #icon>
|
|
|
+ <plus-circle-outlined/>
|
|
|
+ </template>
|
|
|
+ 新增
|
|
|
+ </a-button>
|
|
|
+ </Space>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <!-- <a-divider orientation="left">岗位管理</a-divider>-->
|
|
|
+ <div v-for="(item,index) in postDataList" style="border: 1px solid;margin-bottom: 20px;" :key="index">
|
|
|
+ <h1>基础信息</h1>
|
|
|
+ <a-form :model="item" autocomplete="off">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col flex="400px">
|
|
|
+ <a-form-item
|
|
|
+ label="岗位名称"
|
|
|
+ :label-col="{ span: 6 }"
|
|
|
+ :wrapper-col="{ span: 18 }"
|
|
|
+ name="postName"
|
|
|
+ :rules="[{ required: true, message: '请输入岗位名称!' }]"
|
|
|
+ >
|
|
|
+ <a-input v-model:value="item.postName" placeholder=""/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col flex="400px">
|
|
|
+ <a-form-item
|
|
|
+ label="招聘人数"
|
|
|
+ :label-col="{ span: 6 }"
|
|
|
+ :wrapper-col="{ span: 18 }"
|
|
|
+ name="recruitCount"
|
|
|
+ :rules="[{ required: true, message: '请输入招聘人数!' }]"
|
|
|
+ >
|
|
|
+ <a-input v-model:value="item.recruitCount" placeholder=""/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col flex="300px" :offset="1">
|
|
|
+ <a-form-item
|
|
|
+ label="招聘日期"
|
|
|
+ :label-col="{ span: 8 }"
|
|
|
+ name="startTime"
|
|
|
+ :rules="[{ required: true, message: '请输入招聘开始时间' }]"
|
|
|
+ >
|
|
|
+ <a-date-picker
|
|
|
+ v-model:value="item.startTime"
|
|
|
+ picker="date"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ 至
|
|
|
+ <a-col flex="200px">
|
|
|
+ <a-form-item
|
|
|
+ name="endTime"
|
|
|
+ :rules="[{ required: true, message: '请输入招聘结束时间' }]"
|
|
|
+ >
|
|
|
+ <a-date-picker
|
|
|
+ v-model:value="item.endTime"
|
|
|
+ picker="date"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
|
|
|
+ <a-row>
|
|
|
+ <a-col class="table-bottom-a1" span="22">
|
|
|
+ <a-form-item :label-col="{span:2}" name="jobPlace" label="招聘地点"
|
|
|
+ :rules="[{ required: true, message: '请输入招聘地点' }]"
|
|
|
+ >
|
|
|
+ <a-textarea v-model:value="item.jobPlace" placeholder="" :rows="4"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <h1>其他信息</h1>
|
|
|
+ <a-row>
|
|
|
+ <a-col flex="300px" style="margin-left: 3px;">
|
|
|
+ <a-form-item
|
|
|
+ label="岗位月薪(元)"
|
|
|
+ name="maxSalary"
|
|
|
+ :label-col="{span:9}"
|
|
|
+ :rules="[{ required: false, message: '请输入金额!' }]"
|
|
|
+ >
|
|
|
+ <a-input v-model:value="item.maxSalary" placeholder="请输入金额"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ 至
|
|
|
+ <a-col flex="200px">
|
|
|
+ <a-form-item
|
|
|
+ :label-col="{ span: 6 }"
|
|
|
+ name="minSalary"
|
|
|
+ :rules="[{ required: false, message: '请输入金额' }]"
|
|
|
+ >
|
|
|
+ <a-input v-model:value="item.minSalary" placeholder="请输入金额"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col flex="400px">
|
|
|
+ <a-form-item
|
|
|
+ label="是否试用期"
|
|
|
+ :label-col="{ span: 9 }"
|
|
|
+ name="isTrail"
|
|
|
+ :rules="[{ required: false, message: '请选择是否试用期!' }]"
|
|
|
+ >
|
|
|
+ <a-select
|
|
|
+ ref="select"
|
|
|
+ v-model:value="item.isTrail"
|
|
|
+ :options="trialStatusList"
|
|
|
+ :field-names="{ label: 'name', value: 'value' }"
|
|
|
+ >
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col flex="400px" :offset="1">
|
|
|
+ <a-form-item
|
|
|
+ label="试用期时长(月)"
|
|
|
+ :label-col="{ span: 9 }"
|
|
|
+ name="trailtime"
|
|
|
+ :rules="[{ required: false, message: '请选择试用期时长!' }]"
|
|
|
+ >
|
|
|
+ <a-input v-model:value="item.trailtime" placeholder=""/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="工作年限"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="workYear"
|
|
|
- :rules="[{ required: true, message: '请输入工作年限!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.workYear" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="招聘人数"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="recruitCount"
|
|
|
- :rules="[{ required: true, message: '请输入招聘人数!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.recruitCount" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="文化程度"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="cultureRank"
|
|
|
- :rules="[{ required: true, message: '请选择文化程度!' }]"
|
|
|
- >
|
|
|
- <a-select
|
|
|
- ref="select"
|
|
|
- v-model:value="dataModel.cultureRank"
|
|
|
- :options="cultureLevelList"
|
|
|
- :field-names="{ label: 'name', value: 'value' }"
|
|
|
+ <a-row>
|
|
|
+ <a-col flex="300px" style="margin-left: 3px;">
|
|
|
+ <a-form-item
|
|
|
+ label="试用期(元)"
|
|
|
+ name="trailMaxSalary"
|
|
|
+ :label-col="{span:9}"
|
|
|
+ :rules="[{ required: false, message: '请输入金额!' }]"
|
|
|
>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="最高薪酬"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="maxSalary"
|
|
|
- :rules="[{ required: true, message: '请输入最高薪酬!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.maxSalary" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="最低薪酬"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="minSalary"
|
|
|
- :rules="[{ required: true, message: '请输入最低薪酬!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.minSalary" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="福利待遇"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="welfare"
|
|
|
- :rules="[{ required: true, message: '请输入福利待遇!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.welfare" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="联系人"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="userName"
|
|
|
- :rules="[{ required: true, message: '请选择联系人!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.userName" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="联系电话"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="userMobile"
|
|
|
- :rules="[{ required: true, message: '请输入联系电话!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.userMobile" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="邮箱"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="postEmail"
|
|
|
- :rules="[{ required: true, message: '请输入邮箱!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.postEmail" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="工作时长"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="workTime"
|
|
|
- :rules="[{ required: true, message: '请输入工作时长!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.workTime" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="是否试用期"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="isTrail"
|
|
|
- :rules="[{ required: true, message: '请选择是否试用期!' }]"
|
|
|
- >
|
|
|
- <a-select
|
|
|
- ref="select"
|
|
|
- v-model:value="dataModel.isTrail"
|
|
|
- :options="trialStatusList"
|
|
|
- :field-names="{ label: 'name', value: 'value' }"
|
|
|
+ <a-input v-model:value="item.trailMaxSalary" placeholder="请输入金额"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ 至
|
|
|
+ <a-col flex="200px">
|
|
|
+ <a-form-item
|
|
|
+ :label-col="{ span: 6 }"
|
|
|
+ name="trailMinSalary"
|
|
|
+ :rules="[{ required: false, message: '请输入金额' }]"
|
|
|
>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="试用期时长(月)"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="trailtime"
|
|
|
- :rules="[{ required: true, message: '请选择试用期时长!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.trailtime" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="试用期最高薪酬"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="trailMaxSalary"
|
|
|
- :rules="[{ required: true, message: '请输入试用期最高薪酬!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.trailMaxSalary" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-item
|
|
|
- label="试用期最低薪酬"
|
|
|
- :label-col="{ span: 6 }"
|
|
|
- name="trailMinSalary"
|
|
|
- :rules="[{ required: true, message: '请输入试用期最低薪酬!' }]"
|
|
|
- >
|
|
|
- <a-input v-model:value="dataModel.trailMinSalary" placeholder=""/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-divider orientation="left">其他信息</a-divider>
|
|
|
- <a-row>
|
|
|
- <a-col class="table-bottom-a1">
|
|
|
- <a-form-item :label-col="{span:8}" label="" name="postDesc">
|
|
|
- <a-textarea v-model:value="dataModel.postDesc" placeholder="岗位描述" :rows="4"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-form-item class="buttom-btns">
|
|
|
- <a-button @click="onClose">取消</a-button>
|
|
|
- <a-button type="primary" html-type="submit">提交</a-button>
|
|
|
- </a-form-item>
|
|
|
- </a-form>
|
|
|
+ <a-input v-model:value="item.trailMinSalary" placeholder="请输入金额"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col flex="400px">
|
|
|
+ <a-form-item
|
|
|
+ label="工作年限"
|
|
|
+ :label-col="{ span: 9 }"
|
|
|
+ name="workYear"
|
|
|
+ :rules="[{ required: false, message: '请选择工作年限!' }]"
|
|
|
+ >
|
|
|
+ <a-select
|
|
|
+ ref="select"
|
|
|
+ v-model:value="item.workYear"
|
|
|
+ :options="WorkYearTypelList"
|
|
|
+ :field-names="{ label: 'name', value: 'value' }"
|
|
|
+ >
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col flex="400px" :offset="1">
|
|
|
+ <a-form-item
|
|
|
+ label="学历要求"
|
|
|
+ :label-col="{ span: 9 }"
|
|
|
+ name="trailtime"
|
|
|
+ :rules="[{ required: false, message: '请选择试用期时长!' }]"
|
|
|
+ >
|
|
|
+ <a-select
|
|
|
+ ref="select"
|
|
|
+ v-model:value="item.cultureRank"
|
|
|
+ :options="cultureLevelList"
|
|
|
+ :field-names="{ label: 'name', value: 'value' }"
|
|
|
+ >
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row>
|
|
|
+ <a-col class="table-bottom-a1" span="22">
|
|
|
+ <a-form-item :label-col="{span:2}" name="welfare" label="福利待遇">
|
|
|
+ <a-textarea v-model:value="item.welfare" placeholder="" :rows="4"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row>
|
|
|
+ <a-col class="table-bottom-a1" span="22">
|
|
|
+ <a-form-item :label-col="{span:2}" name="postDesc" label="其他要求">
|
|
|
+ <a-textarea v-model:value="item.postDesc" placeholder="" :rows="4"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row>
|
|
|
+ <a-col style="text-align: right;" span="23">
|
|
|
+ <a-button type="danger" @click="delPostItem(index)">删除</a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <a-form-item class="buttom-btns">
|
|
|
+ <a-button @click="onClose">取消</a-button>
|
|
|
+ <a-button type="primary" @click="onFinish">提交</a-button>
|
|
|
+ </a-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import {defineComponent, reactive, ref, toRefs} from 'vue';
|
|
|
+// import {defineComponent, reactive, ref, toRefs} from 'vue';
|
|
|
+import {defineComponent, reactive, ref} from 'vue';
|
|
|
import {useRouter} from 'vue-router';
|
|
|
-import {save, getPostByID} from '@/api/companyService/post'
|
|
|
+// import {save, getPostByID,savePostList} from '@/api/companyService/post'
|
|
|
+import {savePostList} from '@/api/companyService/post'
|
|
|
import type {SelectProps} from 'ant-design-vue';
|
|
|
import {useTabsViewStore} from '@/store/modules/tabsView';
|
|
|
import BUploadFile from '@/components/file/uploadFile.vue';
|
|
|
import {get} from '@/api/common';
|
|
|
|
|
|
-interface FormState {
|
|
|
- dataModel: any;
|
|
|
+interface postModel {
|
|
|
+ postName: string | null,
|
|
|
+ recruitCount: number | null,
|
|
|
+ startTime: string | null,
|
|
|
+ endTime: string | null,
|
|
|
+ jobPlace: string | null,
|
|
|
+ maxSalary: number | null,
|
|
|
+ minSalary: number | null,
|
|
|
+ isTrail: number | null,
|
|
|
+ trailtime: string | null,
|
|
|
+ trailMaxSalary: number | null,
|
|
|
+ trailMinSalary: number | null,
|
|
|
+ workYear: number | null,
|
|
|
+ cultureRank: number | null,
|
|
|
+ welfare: string | null,
|
|
|
+ postDesc: string | null,
|
|
|
+ companyID: string | null
|
|
|
+ recordStatus: number | null,
|
|
|
+}
|
|
|
+
|
|
|
+interface companyModel {
|
|
|
+ companyId: string | null;
|
|
|
}
|
|
|
|
|
|
export default defineComponent(
|
|
@@ -283,21 +277,51 @@ export default defineComponent(
|
|
|
name: 'PostEdit',
|
|
|
components: {BUploadFile},
|
|
|
setup() {
|
|
|
- const formState = reactive<FormState>({dataModel: {}});
|
|
|
+ const postCompany=reactive<companyModel>({companyId:null});//关联企业信息
|
|
|
const router = useRouter();
|
|
|
const fullpath = router.currentRoute.value.fullPath;
|
|
|
const tabsViewStore = useTabsViewStore();
|
|
|
|
|
|
-
|
|
|
const cultureLevelList = ref<SelectProps['options']>();
|
|
|
+ const WorkYearTypelList = ref<SelectProps['options']>();
|
|
|
const companyList = ref<SelectProps['options']>();
|
|
|
const postStatusList = [{name: '启用', value: 1}, {name: '停用', value: 0}];
|
|
|
const trialStatusList = [{name: '是', value: true}, {name: '否', value: false}];
|
|
|
|
|
|
+ const postDataList = ref<postModel[]>([]);
|
|
|
+ const addPost = () => {
|
|
|
+ (postDataList.value as any[]).push({
|
|
|
+ postName: '',
|
|
|
+ recruitCount: null,
|
|
|
+ startTime: null,
|
|
|
+ endTime: null,
|
|
|
+ jobPlace: null,
|
|
|
+ maxSalary: null,
|
|
|
+ minSalary: null,
|
|
|
+ isTrail: null,
|
|
|
+ trailtime: null,
|
|
|
+ trailMaxSalary: null,
|
|
|
+ trailMinSalary: null,
|
|
|
+ workYear: null,
|
|
|
+ cultureRank: null,
|
|
|
+ welfare: null,
|
|
|
+ postDesc: null,
|
|
|
+ companyID: null
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ const delPostItem = (index) => {
|
|
|
+ (postDataList.value as any[]).splice(index, 1);
|
|
|
+ }
|
|
|
+
|
|
|
get('system/dictionary/getDictionaryItemByCodeList', {code: 'CultureLevel'}).then(result => {
|
|
|
cultureLevelList.value = result;
|
|
|
});
|
|
|
|
|
|
+ get('system/dictionary/getDictionaryItemByCodeList', {code: 'WorkYearType'}).then(result => {
|
|
|
+ WorkYearTypelList.value = result;
|
|
|
+ });
|
|
|
+
|
|
|
get('companyService/company/getList', {pageIndex: 1, pageSize: 999}).then(result => {
|
|
|
companyList.value = result.list;
|
|
|
console.log(companyList);
|
|
@@ -310,7 +334,11 @@ export default defineComponent(
|
|
|
};
|
|
|
|
|
|
const onFinish = () => {
|
|
|
- save(formState.dataModel).then((result) => {
|
|
|
+ postDataList.value.forEach(item => {
|
|
|
+ item.companyID = postCompany.companyId + "";
|
|
|
+ item.recordStatus = 1;
|
|
|
+ })
|
|
|
+ savePostList(postDataList.value).then((result) => {
|
|
|
if (result) {
|
|
|
tabsViewStore.closeCurrentTab(fullpath);
|
|
|
tabsViewStore.addTabByPath('/companyService/post/index', {reload: 1});
|
|
@@ -318,27 +346,41 @@ export default defineComponent(
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- const loadData = (id: any) => {
|
|
|
- getPostByID(id).then(result => {
|
|
|
- formState.dataModel = result;
|
|
|
- })
|
|
|
- };
|
|
|
+ // const loadData = (id: any) => {
|
|
|
+ // getPostByID(id).then(result => {
|
|
|
+ // formState.dataModel = result;
|
|
|
+ // })
|
|
|
+ // };
|
|
|
|
|
|
return {
|
|
|
- ...toRefs(formState),
|
|
|
- loadData,
|
|
|
+ // ...toRefs(formState),
|
|
|
+ // loadData,
|
|
|
onClose,
|
|
|
onFinish,
|
|
|
companyList,
|
|
|
postStatusList,
|
|
|
trialStatusList,
|
|
|
- cultureLevelList
|
|
|
+ cultureLevelList,
|
|
|
+ postDataList,
|
|
|
+ addPost,
|
|
|
+ WorkYearTypelList,
|
|
|
+ delPostItem,
|
|
|
+ postCompany
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- const id = history.state.params?.id;
|
|
|
- this.loadData(id);
|
|
|
+ // const id = history.state.params?.id;
|
|
|
+ // this.loadData(id);
|
|
|
}
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
+<style>
|
|
|
+h1 {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: rgb(24, 144, 255);
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|