|
@@ -6,18 +6,22 @@
|
|
<div class="formDiv">
|
|
<div class="formDiv">
|
|
<div v-if="creatNews_user_type == 10000">
|
|
<div v-if="creatNews_user_type == 10000">
|
|
<el-form-item label="站点名称:" prop="web_site_id" class="custom-align-right">
|
|
<el-form-item label="站点名称:" prop="web_site_id" class="custom-align-right">
|
|
- <el-cascader :key="parentKey" v-model="form.web_site_id" placeholder="请选择站点名称" popper-class="my_cascader" :options="creatNews_nav_pool_arr" @change="creatNews_nav_pool_change_fun(form.web_site_id)" filterable clearable></el-cascader>
|
|
|
|
|
|
+ <el-cascader :key="parentKey" v-model="form.web_site_id" placeholder="请选择站点名称" popper-class="my_cascader"
|
|
|
|
+ :options="creatNews_nav_pool_arr" @change="creatNews_nav_pool_change_fun(form.web_site_id)" filterable
|
|
|
|
+ clearable></el-cascader>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
<el-form-item label="导航池名称:" prop="cat_arr_id" class="custom-align-right">
|
|
<el-form-item label="导航池名称:" prop="cat_arr_id" class="custom-align-right">
|
|
- <el-cascader :key="parentKey_2" v-model="form.cat_arr_id" placeholder="请选择导航池名称" :props="parentData_2" popper-class="my_cascader" filterable clearable></el-cascader>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-cascader :key="parentKey_2" v-model="form.cat_arr_id" placeholder="请选择导航池名称" :props="parentData_2"
|
|
|
|
+ popper-class="my_cascader" filterable clearable></el-cascader>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="招聘职位名称" prop="title" class="custom-align-right">
|
|
<el-form-item label="招聘职位名称" prop="title" class="custom-align-right">
|
|
<el-input v-model="form.title" autocomplete="off" placeholder="请输入招聘职位名称"></el-input>
|
|
<el-input v-model="form.title" autocomplete="off" placeholder="请输入招聘职位名称"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="工作地点:" prop="province_id" class="custom-align-right">
|
|
|
|
- <el-select v-model="form.province_id" placeholder="请选择省" style="display:inline-block;width:50%" @change = "province_change">
|
|
|
|
- <el-option v-for="item in province_array" :key="item.id" :label="item.name" :value="item.id" >
|
|
|
|
|
|
+ <el-form-item label="工作地点:" prop="province_id" class="custom-align-right">
|
|
|
|
+ <el-select v-model="form.province_id" placeholder="请选择省" style="display:inline-block;width:50%"
|
|
|
|
+ @change="province_change">
|
|
|
|
+ <el-option v-for="item in province_array" :key="item.id" :label="item.name" :value="item.id">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
<el-select v-model="form.city_id" placeholder="请选择市" style="width:50%">
|
|
<el-select v-model="form.city_id" placeholder="请选择市" style="width:50%">
|
|
@@ -32,7 +36,7 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="职位类别:" prop="zw_id" class="custom-align-right">
|
|
<el-form-item label="职位类别:" prop="zw_id" class="custom-align-right">
|
|
- <el-select v-model="form.zw_id" placeholder="请选择职位类别" @change = "zwid_change">
|
|
|
|
|
|
+ <el-select v-model="form.zw_id" placeholder="请选择职位类别" @change="zwid_change">
|
|
<el-option v-for="item in zw_array" :key="item.zwid" :label="item.zwname" :value="item.zwid">
|
|
<el-option v-for="item in zw_array" :key="item.zwid" :label="item.zwname" :value="item.zwid">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -55,30 +59,36 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="工作经验:" prop="experience" class="custom-align-right">
|
|
<el-form-item label="工作经验:" prop="experience" class="custom-align-right">
|
|
<el-select v-model="form.experience" clearable placeholder="请选择工作经验">
|
|
<el-select v-model="form.experience" clearable placeholder="请选择工作经验">
|
|
- <el-option v-for="item in experience_array" :key="item.evalue" :label="item.ename" :value="item.evalue"></el-option>
|
|
|
|
|
|
+ <el-option v-for="item in experience_array" :key="item.evalue" :label="item.ename"
|
|
|
|
+ :value="item.evalue"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="学历要求:" prop="educational" class="custom-align-right">
|
|
<el-form-item label="学历要求:" prop="educational" class="custom-align-right">
|
|
<el-select v-model="form.educational" clearable placeholder="请选择学历要求">
|
|
<el-select v-model="form.educational" clearable placeholder="请选择学历要求">
|
|
- <el-option v-for="item in educational_array" :key="item.evalue" :label="item.ename" :value="item.evalue"></el-option>
|
|
|
|
|
|
+ <el-option v-for="item in educational_array" :key="item.evalue" :label="item.ename"
|
|
|
|
+ :value="item.evalue"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="月薪:" prop="salary" class="custom-align-right">
|
|
<el-form-item label="月薪:" prop="salary" class="custom-align-right">
|
|
<el-select v-model="form.salary" clearable placeholder="请输入月薪">
|
|
<el-select v-model="form.salary" clearable placeholder="请输入月薪">
|
|
- <el-option v-for="item in salary_array" :key="item.evalue" :label="item.ename" :value="item.evalue"></el-option>
|
|
|
|
|
|
+ <el-option v-for="item in salary_array" :key="item.evalue" :label="item.ename"
|
|
|
|
+ :value="item.evalue"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="招聘人数:" prop="number" class="custom-align-right">
|
|
<el-form-item label="招聘人数:" prop="number" class="custom-align-right">
|
|
<el-input v-model="form.number" autocomplete="off" placeholder="请输入招聘人数"></el-input>
|
|
<el-input v-model="form.number" autocomplete="off" placeholder="请输入招聘人数"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="语言能力:" prop="language" class="custom-align-right" style="width: 50%;display: inline-block;">
|
|
|
|
|
|
+ <el-form-item label="语言能力:" prop="language" class="custom-align-right"
|
|
|
|
+ style="width: 50%;display: inline-block;">
|
|
<el-select v-model="form.language" clearable placeholder="请选择语种">
|
|
<el-select v-model="form.language" clearable placeholder="请选择语种">
|
|
- <el-option v-for="item in language_array" :key="item.evalue" :label="item.ename" :value="item.evalue"></el-option>
|
|
|
|
|
|
+ <el-option v-for="item in language_array" :key="item.evalue" :label="item.ename"
|
|
|
|
+ :value="item.evalue"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
-
|
|
|
|
- <el-form-item label="掌握程度:" prop="level" class="custom-align-right" style="width: 50%;display: inline-block;">
|
|
|
|
|
|
+
|
|
|
|
+ <el-form-item label="掌握程度:" prop="level" class="custom-align-right"
|
|
|
|
+ style="width: 50%;display: inline-block;">
|
|
<el-select v-model="form.level" clearable placeholder="请选择掌握程度">
|
|
<el-select v-model="form.level" clearable placeholder="请选择掌握程度">
|
|
<el-option v-for="item in level_array" :key="item.evalue" :label="item.ename" :value="item.evalue">
|
|
<el-option v-for="item in level_array" :key="item.evalue" :label="item.ename" :value="item.evalue">
|
|
</el-option>
|
|
</el-option>
|
|
@@ -88,35 +98,42 @@
|
|
<el-input v-model="form.description" type="textarea" :rows="2" placeholder="介绍公司对该职位的职位描述..."> </el-input>
|
|
<el-input v-model="form.description" type="textarea" :rows="2" placeholder="介绍公司对该职位的职位描述..."> </el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="具体要求:" prop="jt_description" class="custom-align-right" style="display:block;">
|
|
<el-form-item label="具体要求:" prop="jt_description" class="custom-align-right" style="display:block;">
|
|
- <el-input v-model="form.jt_description" type="textarea" :rows="2" placeholder="介绍公司对该职位的具体要求..."> </el-input>
|
|
|
|
|
|
+ <el-input v-model="form.jt_description" type="textarea" :rows="2" placeholder="介绍公司对该职位的具体要求...">
|
|
|
|
+ </el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<!--公司信息 start-->
|
|
<!--公司信息 start-->
|
|
<el-form-item label="公司名称:" prop="business_name" class="custom-align-right">
|
|
<el-form-item label="公司名称:" prop="business_name" class="custom-align-right">
|
|
- <el-input v-model="form.business_name" autocomplete="off" placeholder="请输入公司名称" :disabled="creatNews_user_type !== '10000'"></el-input>
|
|
|
|
|
|
+ <el-input v-model="form.business_name" autocomplete="off" placeholder="请输入公司名称"
|
|
|
|
+ :disabled="creatNews_user_type !== '10000'"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="所属行业:" prop="company_hy_id" class="custom-align-right">
|
|
<el-form-item label="所属行业:" prop="company_hy_id" class="custom-align-right">
|
|
- <el-select v-model="form.company_hy_id" clearable placeholder="请选择公司所属的行业" :disabled="creatNews_user_type !== '10000'">
|
|
|
|
|
|
+ <el-select v-model="form.company_hy_id" clearable placeholder="请选择公司所属的行业"
|
|
|
|
+ :disabled="creatNews_user_type !== '10000'">
|
|
<el-option v-for="item in hy_array" :key="item.hyid" :label="item.hyname" :value="item.hyid">
|
|
<el-option v-for="item in hy_array" :key="item.hyid" :label="item.hyname" :value="item.hyid">
|
|
- </el-option>
|
|
|
|
|
|
+ </el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="公司规模:" prop="company_size" class="custom-align-right">
|
|
<el-form-item label="公司规模:" prop="company_size" class="custom-align-right">
|
|
- <el-select v-model="form.company_size" clearable placeholder="请选择公司的规模" :disabled="creatNews_user_type !== '10000'">
|
|
|
|
- <el-option v-for="item in companysize_array" :key="item.evalue" :label="item.ename" :value="item.evalue">
|
|
|
|
|
|
+ <el-select v-model="form.company_size" clearable placeholder="请选择公司的规模"
|
|
|
|
+ :disabled="creatNews_user_type !== '10000'">
|
|
|
|
+ <el-option v-for="item in companysize_array" :key="item.evalue" :label="item.ename"
|
|
|
|
+ :value="item.evalue">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="公司性质:" prop="company_nature" class="custom-align-right">
|
|
<el-form-item label="公司性质:" prop="company_nature" class="custom-align-right">
|
|
- <el-select v-model="form.company_nature" clearable placeholder="请选择公司的性质" :disabled="creatNews_user_type !== '10000'">
|
|
|
|
- <el-option v-for="item in companynature_array" :key="item.id" :label="item.nature_name" :value="item.id">
|
|
|
|
|
|
+ <el-select v-model="form.company_nature" clearable placeholder="请选择公司的性质"
|
|
|
|
+ :disabled="creatNews_user_type !== '10000'">
|
|
|
|
+ <el-option v-for="item in companynature_array" :key="item.id" :label="item.nature_name"
|
|
|
|
+ :value="item.id">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="公司简介:" prop="introduction" class="custom-align-right">
|
|
<el-form-item label="公司简介:" prop="introduction" class="custom-align-right">
|
|
- <el-input v-model="form.introduction" autocomplete="off" :disabled="creatNews_user_type !== '10000'" type="textarea" :rows="2"
|
|
|
|
- placeholder="请填写公司简介..."> </el-input>
|
|
|
|
|
|
+ <el-input v-model="form.introduction" autocomplete="off" :disabled="creatNews_user_type !== '10000'"
|
|
|
|
+ type="textarea" :rows="2" placeholder="请填写公司简介..."> </el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="联系人:" prop="real_name" class="custom-align-right">
|
|
<el-form-item label="联系人:" prop="real_name" class="custom-align-right">
|
|
<el-input v-model="form.real_name" autocomplete="off" :disabled="creatNews_user_type !== '10000'"
|
|
<el-input v-model="form.real_name" autocomplete="off" :disabled="creatNews_user_type !== '10000'"
|
|
@@ -131,12 +148,14 @@
|
|
placeholder="请输入公司网址"></el-input>
|
|
placeholder="请输入公司网址"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="地址:" prop="address_arr_id" class="custom-align-right">
|
|
<el-form-item label="地址:" prop="address_arr_id" class="custom-align-right">
|
|
- <CityCascader v-model="form.address_arr_id" @update-city-id="update_address_arr_id" :user_type="creatNews_user_type"></CityCascader>
|
|
|
|
|
|
+ <CityCascader v-model="form.address_arr_id" @update-city-id="update_address_arr_id"
|
|
|
|
+ :user_type="creatNews_user_type"></CityCascader>
|
|
<el-input v-model="form.address" autocomplete="off" :disabled="creatNews_user_type !== '10000'"
|
|
<el-input v-model="form.address" autocomplete="off" :disabled="creatNews_user_type !== '10000'"
|
|
placeholder="请输入公司地址"></el-input>
|
|
placeholder="请输入公司地址"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="邮箱:" prop="email" class="custom-align-right">
|
|
<el-form-item label="邮箱:" prop="email" class="custom-align-right">
|
|
- <el-input v-model="form.email" autocomplete="off" :disabled="creatNews_user_type !== '10000'" placeholder="请输入邮箱"></el-input>
|
|
|
|
|
|
+ <el-input v-model="form.email" autocomplete="off" :disabled="creatNews_user_type !== '10000'"
|
|
|
|
+ placeholder="请输入邮箱"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!--公司信息 end-->
|
|
<!--公司信息 end-->
|
|
</div>
|
|
</div>
|
|
@@ -214,7 +233,7 @@ export default {
|
|
address_arr_id: [],//地址
|
|
address_arr_id: [],//地址
|
|
// company_hyid_array: [],//所属行业
|
|
// company_hyid_array: [],//所属行业
|
|
creatNews_user_type: '0',//判断用户类型'
|
|
creatNews_user_type: '0',//判断用户类型'
|
|
-
|
|
|
|
|
|
+
|
|
form: {
|
|
form: {
|
|
web_site_id: '',//站点名称
|
|
web_site_id: '',//站点名称
|
|
user_type: "??",//判断用户类型'
|
|
user_type: "??",//判断用户类型'
|
|
@@ -280,13 +299,13 @@ export default {
|
|
hy_id: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
hy_id: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
// 职位描述
|
|
// 职位描述
|
|
description: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
description: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
- // 具体要求
|
|
|
|
- jt_description: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
|
|
|
+ // 具体要求
|
|
|
|
+ jt_description: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
// 截止日期
|
|
// 截止日期
|
|
due_data: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
due_data: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
// 公司名称
|
|
// 公司名称
|
|
business_name: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
business_name: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
// 所属行业
|
|
// 所属行业
|
|
@@ -311,7 +330,7 @@ export default {
|
|
parentKey: 0,//获取父级导航
|
|
parentKey: 0,//获取父级导航
|
|
webDpate: {
|
|
webDpate: {
|
|
checkStrictly: true,
|
|
checkStrictly: true,
|
|
- lazy: true,
|
|
|
|
|
|
+ lazy: true,
|
|
|
|
|
|
},
|
|
},
|
|
parentData: {
|
|
parentData: {
|
|
@@ -378,7 +397,7 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
inputList: [
|
|
inputList: [
|
|
{ value: '' }
|
|
{ value: '' }
|
|
]
|
|
]
|
|
@@ -398,30 +417,30 @@ export default {
|
|
province_change(value) {
|
|
province_change(value) {
|
|
this.form.city_id = ''; // 清空城市选择
|
|
this.form.city_id = ''; // 清空城市选择
|
|
this.$store.dispatch('news/getJobRecruitingArea', { pid: value }).then(res => {
|
|
this.$store.dispatch('news/getJobRecruitingArea', { pid: value }).then(res => {
|
|
- this.city_array = res.data;
|
|
|
|
|
|
+ this.city_array = res.data;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 3.获取行业分类
|
|
// 3.获取行业分类
|
|
get_hyid(value) {
|
|
get_hyid(value) {
|
|
this.$store.dispatch('news/getIndustry').then(res => {
|
|
this.$store.dispatch('news/getIndustry').then(res => {
|
|
- this.hy_array = res.data;
|
|
|
|
- })
|
|
|
|
|
|
+ this.hy_array = res.data;
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 4.获取职位类别
|
|
// 4.获取职位类别
|
|
get_zwid(value) {
|
|
get_zwid(value) {
|
|
this.$store.dispatch('news/getPositionList').then(res => {
|
|
this.$store.dispatch('news/getPositionList').then(res => {
|
|
this.zw_array = res.data;
|
|
this.zw_array = res.data;
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
},
|
|
},
|
|
zwid_change(value) {
|
|
zwid_change(value) {
|
|
// 修改此处,确保传递的是正确的参数对象
|
|
// 修改此处,确保传递的是正确的参数对象
|
|
this.form.jtzw_id = ''; // 清空具体职位选择
|
|
this.form.jtzw_id = ''; // 清空具体职位选择
|
|
this.$store.dispatch('news/getPositionList', { zwpid: value }).then(res => {
|
|
this.$store.dispatch('news/getPositionList', { zwpid: value }).then(res => {
|
|
- this.jtzw_array = res.data;
|
|
|
|
|
|
+ this.jtzw_array = res.data;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
// 6.获取职位性质
|
|
// 6.获取职位性质
|
|
get_natureid(value) {
|
|
get_natureid(value) {
|
|
this.$store.dispatch('news/getJobNature').then(res => {
|
|
this.$store.dispatch('news/getJobNature').then(res => {
|
|
@@ -476,7 +495,7 @@ export default {
|
|
this.companynature_array = res.data;
|
|
this.companynature_array = res.data;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 15.获取地址
|
|
|
|
|
|
+ // 15.获取地址
|
|
get_address_arr_id(value) {
|
|
get_address_arr_id(value) {
|
|
this.$store.dispatch('news/getJobRecruitingArea').then(res => {
|
|
this.$store.dispatch('news/getJobRecruitingArea').then(res => {
|
|
this.address_arr_id = res.data;
|
|
this.address_arr_id = res.data;
|
|
@@ -488,72 +507,72 @@ export default {
|
|
this.$refs.form.validate(valid => {
|
|
this.$refs.form.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
// if(this.creatNews_user_type === '10000'){
|
|
// if(this.creatNews_user_type === '10000'){
|
|
- this.form.user_type = this.creatNews_user_type;
|
|
|
|
- this.form.website_id = this.websiteid;
|
|
|
|
-
|
|
|
|
- if(this.form.province_id != '' && this.form.province_id != null && this.form.province_id != undefined){
|
|
|
|
- this.form.city_arr_id[0] = this.form.province_id;
|
|
|
|
- }else{
|
|
|
|
- this.form.city_arr_id[0] = null;
|
|
|
|
- }
|
|
|
|
- if(this.form.city_id != '' && this.form.city_id != null && this.form.city_id != undefined){
|
|
|
|
- this.form.city_arr_id[1] = this.form.city_id;
|
|
|
|
- }else{
|
|
|
|
- this.form.city_arr_id[1] = null;
|
|
|
|
- }
|
|
|
|
- if(this.form.due_data != '' && this.form.due_data != null && this.form.due_data != undefined){
|
|
|
|
- this.form.due_data = formatLocalDate(this.form.due_data);
|
|
|
|
- }else{
|
|
|
|
- this.form.due_data = null;
|
|
|
|
- }
|
|
|
|
- delete this.form.nav_add_pool_id;
|
|
|
|
- delete this.form.province_id;
|
|
|
|
- delete this.form.job_pronviceid;
|
|
|
|
- delete this.form.city_id;
|
|
|
|
- delete this.form.createjob_pronvice;
|
|
|
|
- delete this.form.web_site_id;
|
|
|
|
- this.$store.dispatch('news/addJobRecruiting', this.form).then(res => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- //汇报结果
|
|
|
|
- this.$message({
|
|
|
|
- type: 'success',
|
|
|
|
- message: '已成功发布职位!'
|
|
|
|
- });
|
|
|
|
- this.cleatForm(2);
|
|
|
|
- //返回列表页
|
|
|
|
- this.returnPage()
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- type: 'error',
|
|
|
|
- message: ": '发布失败!'.".this.$message
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }).catch(() => {
|
|
|
|
|
|
+ this.form.user_type = this.creatNews_user_type;
|
|
|
|
+ this.form.website_id = this.websiteid;
|
|
|
|
+
|
|
|
|
+ if (this.form.province_id != '' && this.form.province_id != null && this.form.province_id != undefined) {
|
|
|
|
+ this.form.city_arr_id[0] = this.form.province_id;
|
|
|
|
+ } else {
|
|
|
|
+ this.form.city_arr_id[0] = null;
|
|
|
|
+ }
|
|
|
|
+ if (this.form.city_id != '' && this.form.city_id != null && this.form.city_id != undefined) {
|
|
|
|
+ this.form.city_arr_id[1] = this.form.city_id;
|
|
|
|
+ } else {
|
|
|
|
+ this.form.city_arr_id[1] = null;
|
|
|
|
+ }
|
|
|
|
+ if (this.form.due_data != '' && this.form.due_data != null && this.form.due_data != undefined) {
|
|
|
|
+ this.form.due_data = formatLocalDate(this.form.due_data);
|
|
|
|
+ } else {
|
|
|
|
+ this.form.due_data = null;
|
|
|
|
+ }
|
|
|
|
+ delete this.form.nav_add_pool_id;
|
|
|
|
+ delete this.form.province_id;
|
|
|
|
+ delete this.form.job_pronviceid;
|
|
|
|
+ delete this.form.city_id;
|
|
|
|
+ delete this.form.createjob_pronvice;
|
|
|
|
+ delete this.form.web_site_id;
|
|
|
|
+ this.$store.dispatch('news/addJobRecruiting', this.form).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ //汇报结果
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '已成功发布职位!'
|
|
|
|
+ });
|
|
|
|
+ this.cleatForm(2);
|
|
|
|
+ //返回列表页
|
|
|
|
+ this.returnPage()
|
|
|
|
+ } else {
|
|
this.$message({
|
|
this.$message({
|
|
- type: 'info',
|
|
|
|
- message: '网络错误,请重试!'
|
|
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: ": '发布失败!'.".this.$message
|
|
});
|
|
});
|
|
- })
|
|
|
|
|
|
+ }
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '网络错误,请重试!'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
//1.3 清理表单
|
|
//1.3 清理表单
|
|
cleatForm(type) {
|
|
cleatForm(type) {
|
|
// if (type == 1) {
|
|
// if (type == 1) {
|
|
- //使用了外链,进行部分表单清理
|
|
|
|
- //this.form.cat_arr_id = "";
|
|
|
|
- this.form.cat_arr_id = "";
|
|
|
|
- this.form.province_id = "";
|
|
|
|
- this.form.title = "";
|
|
|
|
- this.form.zw_id = "";
|
|
|
|
- this.form.jtzw_id = "";
|
|
|
|
- this.form.nature_id = "";
|
|
|
|
- this.form.city_id = "";
|
|
|
|
- this.form.hy_id = "";
|
|
|
|
- this.form.description = "";
|
|
|
|
- this.form.due_data = "";
|
|
|
|
|
|
+ //使用了外链,进行部分表单清理
|
|
|
|
+ //this.form.cat_arr_id = "";
|
|
|
|
+ this.form.cat_arr_id = "";
|
|
|
|
+ this.form.province_id = "";
|
|
|
|
+ this.form.title = "";
|
|
|
|
+ this.form.zw_id = "";
|
|
|
|
+ this.form.jtzw_id = "";
|
|
|
|
+ this.form.nature_id = "";
|
|
|
|
+ this.form.city_id = "";
|
|
|
|
+ this.form.hy_id = "";
|
|
|
|
+ this.form.description = "";
|
|
|
|
+ this.form.due_data = "";
|
|
// }
|
|
// }
|
|
if (this.creatNews_user_type == '10000') {
|
|
if (this.creatNews_user_type == '10000') {
|
|
//完全清理表单
|
|
//完全清理表单
|
|
@@ -589,45 +608,45 @@ export default {
|
|
//跳转操作 end ------------------------------------------------------------>
|
|
//跳转操作 end ------------------------------------------------------------>
|
|
|
|
|
|
//3.回显操作 ------------------------------------------------------------>
|
|
//3.回显操作 ------------------------------------------------------------>
|
|
- // //3.1回显数据
|
|
|
|
- //3.1回显数据
|
|
|
|
- getMainData() {
|
|
|
|
- if(this.creatNews_user_type === '10000' || this.$route.query.id != undefined){
|
|
|
|
- let data = {
|
|
|
|
- id: this.$route.query.id
|
|
|
|
- };
|
|
|
|
- this.$store.dispatch('news/getJobRecruitingInfo', data).then(res => {
|
|
|
|
- //判断web_site_id是否为字符串,如果是转换为数字、
|
|
|
|
- //职位信息
|
|
|
|
- if (typeof res.data.web_site_id === 'string') {
|
|
|
|
- this.form.web_site_id = Number(res.data.website_id);
|
|
|
|
- } else {
|
|
|
|
- this.form.web_site_id = res.data.website_id //站点名称
|
|
|
|
- }
|
|
|
|
- this.form.cat_arr_id = Array.isArray(res.data.cat_arr_id) ? res.data.cat_arr_id : JSON.parse(res.data.cat_arr_id);
|
|
|
|
- this.parentKey_2 += 1; // 触发级联选择器重新加载
|
|
|
|
- this.loadCascaderPath(this.form.cat_arr_id); // 加载路径数据
|
|
|
|
- //回显行政区划
|
|
|
|
- this.form.city_arr_id = Array.isArray(res.data.city_arr_id) ? res.data.city_arr_id : JSON.parse(res.data.city_arr_id);
|
|
|
|
-
|
|
|
|
- this.form.title = res.data.title; //职位名称
|
|
|
|
-
|
|
|
|
- this.parentKey += 1; // 触发级联选择器重新加载
|
|
|
|
- if (this.form.city_arr_id.length > 0) {
|
|
|
|
- this.form.province_id = this.form.city_arr_id[0]?? '';
|
|
|
|
- if (this.form.city_arr_id.length > 1) {
|
|
|
|
- this.province_change(this.form.city_arr_id[0]);
|
|
|
|
- this.form.city_id = this.form.city_arr_id[1]?? '';
|
|
|
|
- }else{
|
|
|
|
- let data = {
|
|
|
|
- 'pid': this.form.city_arr_id[0]
|
|
|
|
|
|
+ // //3.1回显数据
|
|
|
|
+ //3.1回显数据
|
|
|
|
+ getMainData() {
|
|
|
|
+ if (this.creatNews_user_type === '10000' || this.$route.query.id != undefined) {
|
|
|
|
+ let data = {
|
|
|
|
+ id: this.$route.query.id
|
|
|
|
+ };
|
|
|
|
+ this.$store.dispatch('news/getJobRecruitingInfo', data).then(res => {
|
|
|
|
+ //判断web_site_id是否为字符串,如果是转换为数字、
|
|
|
|
+ //职位信息
|
|
|
|
+ if (typeof res.data.web_site_id === 'string') {
|
|
|
|
+ this.form.web_site_id = Number(res.data.website_id);
|
|
|
|
+ } else {
|
|
|
|
+ this.form.web_site_id = res.data.website_id //站点名称
|
|
|
|
+ }
|
|
|
|
+ this.form.cat_arr_id = Array.isArray(res.data.cat_arr_id) ? res.data.cat_arr_id : JSON.parse(res.data.cat_arr_id);
|
|
|
|
+ this.parentKey_2 += 1; // 触发级联选择器重新加载
|
|
|
|
+ this.loadCascaderPath(this.form.cat_arr_id); // 加载路径数据
|
|
|
|
+ //回显行政区划
|
|
|
|
+ this.form.city_arr_id = Array.isArray(res.data.city_arr_id) ? res.data.city_arr_id : JSON.parse(res.data.city_arr_id);
|
|
|
|
+
|
|
|
|
+ this.form.title = res.data.title; //职位名称
|
|
|
|
+
|
|
|
|
+ this.parentKey += 1; // 触发级联选择器重新加载
|
|
|
|
+ if (this.form.city_arr_id.length > 0) {
|
|
|
|
+ this.form.province_id = this.form.city_arr_id[0] ?? '';
|
|
|
|
+ if (this.form.city_arr_id.length > 1) {
|
|
|
|
+ this.province_change(this.form.city_arr_id[0]);
|
|
|
|
+ this.form.city_id = this.form.city_arr_id[1] ?? '';
|
|
|
|
+ } else {
|
|
|
|
+ let data = {
|
|
|
|
+ 'pid': this.form.city_arr_id[0]
|
|
|
|
+ }
|
|
|
|
+ this.$store.dispatch('news/getJobRecruitingArea', data).then(res => {
|
|
|
|
+ this.city_id = res.data;
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- this.$store.dispatch('news/getJobRecruitingArea',data ).then(res => {
|
|
|
|
- this.city_id = res.data;
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
this.form.hy_id = res.data.hy_id; //行业分类
|
|
this.form.hy_id = res.data.hy_id; //行业分类
|
|
this.form.zw_id = res.data.zw_id; //职位类别
|
|
this.form.zw_id = res.data.zw_id; //职位类别
|
|
this.zwid_change(this.form.zw_id);
|
|
this.zwid_change(this.form.zw_id);
|
|
@@ -655,49 +674,49 @@ export default {
|
|
this.form.address = res.data.address;
|
|
this.form.address = res.data.address;
|
|
this.form.address_arr_id = Array.isArray(res.data.address_arr_id) ? res.data.address_arr_id : JSON.parse(res.data.address_arr_id);
|
|
this.form.address_arr_id = Array.isArray(res.data.address_arr_id) ? res.data.address_arr_id : JSON.parse(res.data.address_arr_id);
|
|
this.form.email = res.data.email;
|
|
this.form.email = res.data.email;
|
|
- this.inputList = [];
|
|
|
|
- console.log(this.inputList)
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- this.$store.dispatch('news/getJobCompany').then(res => {
|
|
|
|
- // 企业信息
|
|
|
|
- this.form.business_name = res.data.business_name;
|
|
|
|
- this.form.company_hy_id = res.data.company_hy_id;
|
|
|
|
- this.form.company_size = res.data.company_size;
|
|
|
|
- this.form.company_nature = res.data.company_nature;
|
|
|
|
- this.form.introduction = res.data.introduction;
|
|
|
|
- this.form.real_name = res.data.real_name;
|
|
|
|
- this.form.mobile = res.data.mobile;
|
|
|
|
- this.form.company_url = res.data.company_url;
|
|
|
|
- this.form.address = res.data.address;
|
|
|
|
- this.form.address_arr_id = Array.isArray(res.data.address_arr_id) ? res.data.address_arr_id : JSON.parse(res.data.address_arr_id);
|
|
|
|
- this.form.email = res.data.email;
|
|
|
|
- this.inputList = [];
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- async loadCascaderPath(path) {
|
|
|
|
- for (let i = 0; i < path.length; i++) {
|
|
|
|
- const parentId = path[i - 1] || 0; // 获取当前层级的父级ID
|
|
|
|
- const level = i; // 当前层级的索引
|
|
|
|
-
|
|
|
|
- await this.$store.dispatch('pool/categoryList', { pid: parentId })
|
|
|
|
- .then((res) => {
|
|
|
|
- const nodes = res.data.map(item => ({
|
|
|
|
- value: item.id,
|
|
|
|
- label: item.name,
|
|
|
|
- leaf: level >= 3, // 假设4层结构,设置叶子节点标记
|
|
|
|
- }));
|
|
|
|
-
|
|
|
|
- // 级联选择器加载数据
|
|
|
|
- if (level === path.length - 1) {
|
|
|
|
- this.form.cat_arr_id = path; // 确保最后一级路径正确设置
|
|
|
|
- this.parentKey += 1; // 强制刷新 cascader
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ this.inputList = [];
|
|
|
|
+ console.log(this.inputList)
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$store.dispatch('news/getJobCompany').then(res => {
|
|
|
|
+ // 企业信息
|
|
|
|
+ this.form.business_name = res.data.business_name;
|
|
|
|
+ this.form.company_hy_id = res.data.company_hy_id;
|
|
|
|
+ this.form.company_size = res.data.company_size;
|
|
|
|
+ this.form.company_nature = res.data.company_nature;
|
|
|
|
+ this.form.introduction = res.data.introduction;
|
|
|
|
+ this.form.real_name = res.data.real_name;
|
|
|
|
+ this.form.mobile = res.data.mobile;
|
|
|
|
+ this.form.company_url = res.data.company_url;
|
|
|
|
+ this.form.address = res.data.address;
|
|
|
|
+ this.form.address_arr_id = Array.isArray(res.data.address_arr_id) ? res.data.address_arr_id : JSON.parse(res.data.address_arr_id);
|
|
|
|
+ this.form.email = res.data.email;
|
|
|
|
+ this.inputList = [];
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ async loadCascaderPath(path) {
|
|
|
|
+ for (let i = 0; i < path.length; i++) {
|
|
|
|
+ const parentId = path[i - 1] || 0; // 获取当前层级的父级ID
|
|
|
|
+ const level = i; // 当前层级的索引
|
|
|
|
+
|
|
|
|
+ await this.$store.dispatch('pool/categoryList', { pid: parentId })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ const nodes = res.data.map(item => ({
|
|
|
|
+ value: item.id,
|
|
|
|
+ label: item.name,
|
|
|
|
+ leaf: level >= 3, // 假设4层结构,设置叶子节点标记
|
|
|
|
+ }));
|
|
|
|
+
|
|
|
|
+ // 级联选择器加载数据
|
|
|
|
+ if (level === path.length - 1) {
|
|
|
|
+ this.form.cat_arr_id = path; // 确保最后一级路径正确设置
|
|
|
|
+ this.parentKey += 1; // 强制刷新 cascader
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//1.3提交修改
|
|
//1.3提交修改
|
|
editToServe() {
|
|
editToServe() {
|
|
//添加要修改的id
|
|
//添加要修改的id
|
|
@@ -708,8 +727,8 @@ export default {
|
|
this.$refs.form.validate(valid => {
|
|
this.$refs.form.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.form.city_arr_id[0] = this.form.province_id;
|
|
this.form.city_arr_id[0] = this.form.province_id;
|
|
- if(this.form.city_id!= '' && this.form.city_id!= null && this.form.city_id!= undefined){
|
|
|
|
- this.form.city_arr_id[1] = this.form.city_id;
|
|
|
|
|
|
+ if (this.form.city_id != '' && this.form.city_id != null && this.form.city_id != undefined) {
|
|
|
|
+ this.form.city_arr_id[1] = this.form.city_id;
|
|
}
|
|
}
|
|
// 假设你有一个 JSON 字符串变量 jsonStr,这里将其转换为数组
|
|
// 假设你有一个 JSON 字符串变量 jsonStr,这里将其转换为数组
|
|
try {
|
|
try {
|
|
@@ -808,7 +827,7 @@ export default {
|
|
mounted() {
|
|
mounted() {
|
|
this.creatNews_user_type = getUseType()
|
|
this.creatNews_user_type = getUseType()
|
|
this.websiteid = getWebSiteId()
|
|
this.websiteid = getWebSiteId()
|
|
- if(this.creatNews_user_type !== '10000'){
|
|
|
|
|
|
+ if (this.creatNews_user_type !== '10000') {
|
|
this.form.web_site_id = this.websiteid;
|
|
this.form.web_site_id = this.websiteid;
|
|
// console.log("this.form.web_site_id==",this.form.web_site_id)
|
|
// console.log("this.form.web_site_id==",this.form.web_site_id)
|
|
}
|
|
}
|
|
@@ -838,16 +857,25 @@ export default {
|
|
this.getMainData();
|
|
this.getMainData();
|
|
} else {
|
|
} else {
|
|
this.editStatus = false;
|
|
this.editStatus = false;
|
|
- console.log(typeof(this.creatNews_user_type))
|
|
|
|
- if(this.creatNews_user_type === '3'){
|
|
|
|
|
|
+ console.log(typeof (this.creatNews_user_type))
|
|
|
|
+ if (this.creatNews_user_type === '3') {
|
|
this.getMainData();
|
|
this.getMainData();
|
|
- console.log("添加新闻!",this.creatNews_user_type)
|
|
|
|
|
|
+ console.log("添加新闻!", this.creatNews_user_type)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ '$route'(to, from) {
|
|
|
|
+ console.log(from, '---------------------------------------');
|
|
|
|
+ // 监听路由参数中的 id 变化,若变化则更新页面状态并获取数据
|
|
|
|
+ if (to.query.id) {
|
|
|
|
+ this.getMainData();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -930,19 +958,21 @@ export default {
|
|
.ql-indent-8 {
|
|
.ql-indent-8 {
|
|
padding-left: 128px;
|
|
padding-left: 128px;
|
|
}
|
|
}
|
|
-#company_list{
|
|
|
|
|
|
+
|
|
|
|
+#company_list {
|
|
height: 500px;
|
|
height: 500px;
|
|
overflow: auto;
|
|
overflow: auto;
|
|
padding: 20px 50px;
|
|
padding: 20px 50px;
|
|
}
|
|
}
|
|
-#company_list .descriptions{
|
|
|
|
|
|
+
|
|
|
|
+#company_list .descriptions {
|
|
line-height: 36px;
|
|
line-height: 36px;
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
color: #606266;
|
|
color: #606266;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
padding-left: 30px;
|
|
padding-left: 30px;
|
|
width: 500px;
|
|
width: 500px;
|
|
- margin-right:200px;
|
|
|
|
|
|
+ margin-right: 200px;
|
|
background-color: aquamarine;
|
|
background-color: aquamarine;
|
|
}
|
|
}
|
|
|
|
|