flat: 修改全职岗位和零工岗位的问题
This commit is contained in:
@@ -10,6 +10,43 @@
|
||||
|
||||
@closed="closed"
|
||||
>
|
||||
<template >
|
||||
<div class="avue-group__header">
|
||||
<div class="avue-group__title">用工单位信息</div>
|
||||
</div>
|
||||
<el-form size="small">
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item label="用工单位:">{{ employerInfor.jobCompanyName }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item label="单位信用代码:">{{ employerInfor.jobCompanyScale }}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item label="联系人:">{{ employerInfor.callName }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item label="联系电话:">{{ employerInfor.callNumber }}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item label="用工单位性质:">{{ employerInfor.jobCompanyNature }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item label="行业:">{{ employerInfor.jobCompanyIndustry }}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item label="单位介绍:">{{ employerInfor.jobCompanyDescription }}</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<avue-form
|
||||
class="copy-form"
|
||||
:option="option"
|
||||
@@ -17,36 +54,6 @@
|
||||
ref="form"
|
||||
@submit="submit"
|
||||
>
|
||||
<!-- <template slot="userNature">
|
||||
<el-select v-model="obj.userNature">
|
||||
<el-option v-for="(item,index) in userNatureList" :key="index" :label="item.label" :value="item.value">{{item.label}}</el-option>
|
||||
</el-select>
|
||||
</template> -->
|
||||
<!-- <template slot-scope="{ disabled }" slot="wage">
|
||||
<el-input
|
||||
placeholder="请输入 参考工资"
|
||||
v-model="obj.wage"
|
||||
:disabled="disabled"
|
||||
class="input-with-select"
|
||||
>
|
||||
<el-select
|
||||
v-model="obj.wageUnitCategory"
|
||||
slot="append"
|
||||
placeholder="请选择单位"
|
||||
style="width: 100%"
|
||||
:disabled="disabled"
|
||||
>
|
||||
<template v-for="(item, key) in wageUnitCategory">
|
||||
<el-option
|
||||
v-if="!item.disable"
|
||||
:key="key"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</template> -->
|
||||
|
||||
<template slot="cityId" slot-scope="{ disabled }">
|
||||
<jl-cityLabel-cascader
|
||||
@@ -59,22 +66,6 @@
|
||||
</template>
|
||||
|
||||
<template slot="jobCompanyName" slot-scope="{row,disabled}">
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="obj.jobCompanyName"-->
|
||||
<!-- filterable-->
|
||||
<!-- :remote="true"-->
|
||||
<!-- :remoteMethod="remoteMethod"-->
|
||||
<!-- @change="selectMissionCompany"-->
|
||||
<!-- :loading="missionCompanyLoad"-->
|
||||
<!-- placeholder="请选择"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in options23"-->
|
||||
<!-- :key="item.label"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.label">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<el-autocomplete
|
||||
style="'width:100%'"
|
||||
class="inline-input"
|
||||
@@ -93,12 +84,12 @@
|
||||
></jl-cityLabel-cascader>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="wage">
|
||||
<el-input placeholder="请输入工资" type="number" v-model="obj.wage" class="input-with-select">
|
||||
<el-select v-model="obj.wageUnitCategory" slot="append" placeholder="请选择" @change="getMaxAndMin">
|
||||
<el-option :label="item.label" v-for="item in wageUnitCategory" :key="item.value"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
<div class="input-with-select">
|
||||
<el-input v-model="obj.wage" placeholder="请输入工资" type="number"></el-input>
|
||||
~ <el-input placeholder="请输入工资" type="number" v-model="obj.wageUpper" ></el-input>
|
||||
<span>元/人·月</span>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<template slot-scope="{ disabled }" slot="skillIds">
|
||||
<skill-select
|
||||
@@ -112,17 +103,6 @@
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ disabled }" slot="address">
|
||||
<!-- <select-map-->
|
||||
<!-- ref="selectMap"-->
|
||||
<!-- @addAddress="addAddress"-->
|
||||
<!-- @addressDel="addressDel"-->
|
||||
<!-- @input="inputAddress"-->
|
||||
<!-- :isCanEdit="!disabled"-->
|
||||
<!-- :lng="obj.lon"-->
|
||||
<!-- :lat="obj.lat"-->
|
||||
<!-- :address="obj.address"-->
|
||||
<!-- :type="type"-->
|
||||
<!-- ></select-map>-->
|
||||
<super-map-view
|
||||
ref="selectMap"
|
||||
@addAddress="addAddress"
|
||||
@@ -272,7 +252,9 @@ export default {
|
||||
stimeDate: null,
|
||||
workTypesNameList: [],
|
||||
wallMaxAndMin: [],
|
||||
dwlist: []
|
||||
dwlist: [],
|
||||
|
||||
employerInfor: {}
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -382,78 +364,6 @@ export default {
|
||||
},
|
||||
option() {
|
||||
const self = this;
|
||||
// var skill = function (rule, value, callback) {
|
||||
// if (self.selectedSkills.length <= 0) {
|
||||
// callback(new Error("请选择技能标签"));
|
||||
// } else {
|
||||
// callback();
|
||||
// }
|
||||
// };
|
||||
// const wage = (rule, value, callback) => {
|
||||
// if(value == ""){
|
||||
// callback(
|
||||
// new Error(
|
||||
// "请填写参考工资"
|
||||
// )
|
||||
// );
|
||||
// }else if (
|
||||
// !/^([1-9]\d*|0)(\.\d{0,2})?$/.test(value) ||
|
||||
// value <= 0 ||
|
||||
// value > 99999
|
||||
// ) {
|
||||
// callback(
|
||||
// new Error(
|
||||
//
|
||||
// )
|
||||
// );
|
||||
// } else if (
|
||||
// this.obj.wageUnitCategory === null ||
|
||||
// this.obj.wageUnitCategory === undefined
|
||||
// ) {
|
||||
// callback(new Error("请选择单位"));
|
||||
// } else {
|
||||
// callback();
|
||||
// }
|
||||
// };
|
||||
// const tradeId = (rule, value, callback) => {
|
||||
// if(this.tradeState == null || this.tradeState == undefined || this.tradeState == ""){
|
||||
// callback(
|
||||
// new Error(
|
||||
// "请选择行业类型"
|
||||
// )
|
||||
// )
|
||||
// }else{
|
||||
// if(!this.tradeBtnState){
|
||||
// callback(
|
||||
// new Error(
|
||||
// "新增行业要添加后才能使用"
|
||||
// )
|
||||
// )
|
||||
// }else{
|
||||
// callback();
|
||||
// }
|
||||
|
||||
// }
|
||||
// };
|
||||
// const workType = (rule, value, callback) => {
|
||||
// if(this.workTypeState == null || this.workTypeState == undefined || this.workTypeState == ""){
|
||||
// callback(
|
||||
// new Error(
|
||||
// "请选择工种"
|
||||
// )
|
||||
// )
|
||||
// }else{
|
||||
// if(!this.workTypeBtnState){
|
||||
// callback(
|
||||
// new Error(
|
||||
// "新增工种要添加后才能使用"
|
||||
// )
|
||||
// )
|
||||
// }else{
|
||||
// callback();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
const validatePass = (rule, value, callback) => {
|
||||
let specialKey = "[`~#$^&*()=|{}\\[\\]<>/~#¥……&*()——|{}【】《》%@‘”“']‘'";
|
||||
let flagValue = true;
|
||||
@@ -598,14 +508,14 @@ export default {
|
||||
formslot: true,
|
||||
labelslot: false,
|
||||
errorslot: false,
|
||||
// dicData: wageOptionsMonth,
|
||||
// rules: [
|
||||
// {
|
||||
// required: true,
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
span: 12,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入参考工资",
|
||||
trigger: "blur",
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "行业类型",
|
||||
@@ -763,126 +673,10 @@ export default {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "用工单位信息",
|
||||
label: "用工单位地址",
|
||||
prop: "contactsRequire",
|
||||
arrow: false,
|
||||
column: [
|
||||
{
|
||||
label: "用工单位",
|
||||
prop: "jobCompanyName",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入用工单位",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
formslot: true,
|
||||
span: 12,
|
||||
},
|
||||
{
|
||||
label: "单位信用代码",
|
||||
prop: "jobCompanyScale",
|
||||
// disabled: true,
|
||||
// rules: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请输入单位信用代码",
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
span: 12,
|
||||
},
|
||||
{
|
||||
label: "所属行业",
|
||||
prop: "jobCompanyIndustry",
|
||||
// disabled: true,
|
||||
// rules: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请输入所属行业",
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
span: 12,
|
||||
},
|
||||
{
|
||||
prop: "jobCompanyNature",
|
||||
label: "单位性质",
|
||||
type: 'select',
|
||||
// disabled: true,
|
||||
dicUrl: "/api/jobslink-api/system/dict-biz/dictionary?code=company_nature",
|
||||
props: {
|
||||
label: "dictValue",
|
||||
value: "dictKey",
|
||||
},
|
||||
// rules: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请输入单位性质",
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
span: 12,
|
||||
},
|
||||
{
|
||||
label: "单位介绍",
|
||||
prop: "jobCompanyDescription",
|
||||
type: "textarea",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入单位介绍",
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
min: 30,
|
||||
max: 200,
|
||||
message: "长度在 30 到 200 个字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
placeholder: "请输入单位介绍,字数30-200字以内",
|
||||
span: 24,
|
||||
maxlength: 200,
|
||||
showWordLimit: true,
|
||||
},
|
||||
{
|
||||
label: "联系人",
|
||||
prop: "callName",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入联系人",
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
min: 1,
|
||||
max: 8,
|
||||
message: "长度在 1 到 5 个字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
span: 8,
|
||||
},
|
||||
{
|
||||
label: "手机号",
|
||||
prop: "callTel",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
validator: validateTel,
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
span: 8,
|
||||
},
|
||||
{
|
||||
label: "座机",
|
||||
prop: "callNumber",
|
||||
span: 8,
|
||||
},
|
||||
{
|
||||
label: "工作地址",
|
||||
type: "input",
|
||||
@@ -935,6 +729,7 @@ export default {
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
console.log("resetForm")
|
||||
this.obj.jobName = ""
|
||||
this.obj.stime = ""
|
||||
this.obj.etime = ""
|
||||
@@ -1124,47 +919,6 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
//点击工种添加按钮
|
||||
// handleIconClickWorkType() {
|
||||
// this.$message.closeAll();
|
||||
// let nameState = this.workDataNameAttr.indexOf(this.workTypeState)
|
||||
// if(this.workTypeState == ""){
|
||||
// this.$message({
|
||||
// type: "error",
|
||||
// message: "请输入要添加的工种!",
|
||||
// })
|
||||
// }else if(nameState != -1){
|
||||
// this.$message({
|
||||
// type: "error",
|
||||
// message: "此工种已存在,请在列表中选择!",
|
||||
// })
|
||||
// }else{
|
||||
// workListAdd(this.obj.tradeId,this.workTypeState).then((res) =>{
|
||||
// if(res.data.code == 200){
|
||||
// this.obj.worktypeIds = res.data.data;
|
||||
// this.$message({
|
||||
// type: "success",
|
||||
// message: res.data.msg,
|
||||
// })
|
||||
// this.workTypeBtnState = true;
|
||||
// this.clearValidator('worktypeIds');
|
||||
// getWork(this.obj.tradeId).then((res) => {
|
||||
// this.workData = res;
|
||||
// this.workDataNameAttr = res.map((ele)=>{
|
||||
// return ele.name
|
||||
// })
|
||||
// })
|
||||
// }else{
|
||||
// this.$message({
|
||||
// type: "error",
|
||||
// message: res.data.msg,
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// },
|
||||
//
|
||||
addressDel() {
|
||||
this.obj.address = "";
|
||||
},
|
||||
@@ -1188,12 +942,21 @@ export default {
|
||||
})
|
||||
},
|
||||
closed() {
|
||||
console.log(this.obj, '1')
|
||||
this.tradeState = "";
|
||||
this.workTypeState = "";
|
||||
this.$refs.form.init();
|
||||
console.log(this.obj, '2')
|
||||
this.$refs.form.resetForm();
|
||||
console.log(this.obj, '3')
|
||||
this.$refs.form.clearValidate();
|
||||
console.log(this.obj, '4')
|
||||
this.obj = {
|
||||
jobCompanyName: this.obj.jobCompanyName,
|
||||
jobCompanyScale: this.obj.jobCompanyScale,
|
||||
callName: this.obj.callName,
|
||||
callTel: this.obj.callTel,
|
||||
jobCompanyDescription: this.obj.jobCompanyDescription,
|
||||
wageUnitCategory: 3,
|
||||
sex: 0,
|
||||
ageDesc: "不限年龄",
|
||||
@@ -1219,6 +982,7 @@ export default {
|
||||
}
|
||||
},
|
||||
submit(row, done) {
|
||||
console.log(row, row.wageUpper, 'row')
|
||||
if (this.$refs.selectMap.addressLocation == "") {
|
||||
return this.$message({
|
||||
type: "error",
|
||||
@@ -1226,6 +990,15 @@ export default {
|
||||
});
|
||||
}
|
||||
row.address = this.$refs.selectMap.addressLocation;
|
||||
if (!row.wageUpper){
|
||||
console.log(111)
|
||||
done()
|
||||
return this.$message({
|
||||
type: "error",
|
||||
message: "请填写薪资范围上限!",
|
||||
});
|
||||
}
|
||||
|
||||
// let ids = [];
|
||||
// let name = [];
|
||||
// this.selectedSkills.forEach((ele) => {
|
||||
@@ -1260,7 +1033,7 @@ export default {
|
||||
row.worktypeIds = row.workSkills.join(',')
|
||||
row.worktypeNames = row.workSkills.map((id) => this.workTypesNameObj[id]).join(',')
|
||||
row.workSkills = row.workSkills.join(',')
|
||||
console.log(row)
|
||||
console.log(row, '445454')
|
||||
// 修改原数据workSkills
|
||||
if (this.type === "add" || this.type === "copy") {
|
||||
this.$jlEvent("trialCheck")
|
||||
@@ -1286,18 +1059,19 @@ export default {
|
||||
ageDesc: row.ageDesc,
|
||||
education: row.education,
|
||||
experienceDesc: row.experienceDesc,
|
||||
jobCompanyName: row.jobCompanyName,
|
||||
jobCompanyScale: row.jobCompanyScale,
|
||||
jobCompanyIndustry: row.jobCompanyIndustry,
|
||||
jobCompanyNature: row.jobCompanyNature,
|
||||
jobCompanyDescription: row.jobCompanyDescription,
|
||||
callName: row.callName,
|
||||
callTel: row.callTel,
|
||||
callNumber: row.callNumber,
|
||||
jobCompanyName: this.employerInfor.jobCompanyName,
|
||||
jobCompanyScale: this.employerInfor.jobCompanyScale,
|
||||
jobCompanyIndustry: this.employerInfor.jobCompanyIndustry,
|
||||
jobCompanyNature: this.employerInfor.jobCompanyNature,
|
||||
jobCompanyDescription: this.employerInfor.jobCompanyDescription,
|
||||
callName: this.employerInfor.callName,
|
||||
callTel: this.employerInfor.callTel,
|
||||
callNumber: this.employerInfor.callNumber,
|
||||
cityId: row.cityId.replace(/\s+/g, ""),
|
||||
address: row.address,
|
||||
lat: row.lat,
|
||||
lon: row.lon,
|
||||
wageUpper: row.wageUpper,
|
||||
}).then(
|
||||
() => {
|
||||
this.$message({
|
||||
@@ -1327,61 +1101,6 @@ export default {
|
||||
.catch(() => {
|
||||
done();
|
||||
});
|
||||
} else if (this.type === "edit") {
|
||||
update({
|
||||
id: this.id,
|
||||
jobName: row.jobName,
|
||||
stime: row.stime,
|
||||
etime: row.etime,
|
||||
etimePub: row.etimePub,
|
||||
peopleNum: row.peopleNum,
|
||||
wage: row.wage,
|
||||
wageUnitCategory: row.wageUnitCategory,
|
||||
tradeId: row.tradeId,
|
||||
tradeNames: row.tradeNames,
|
||||
worktypeIds: row.worktypeIds,
|
||||
worktypeNames: row.worktypeNames,
|
||||
jobCompanyScale: row.jobCompanyScale,
|
||||
skillIds: row.workSkills[1],
|
||||
skillNames: row.skillNames,
|
||||
jobDescription: row.jobDescription,
|
||||
userNature: row.userNature,
|
||||
jobCompanyDescription: row.jobCompanyDescription,
|
||||
sex: row.sex,
|
||||
ageDesc: row.ageDesc,
|
||||
education: row.education,
|
||||
experienceDesc: row.experienceDesc,
|
||||
callName: row.callName,
|
||||
callTel: row.callTel,
|
||||
callNumber: row.callNumber,
|
||||
cityId: row.cityId.replace(/\s+/g, ""),
|
||||
address: row.address,
|
||||
lat: row.lat,
|
||||
lon: row.lon,
|
||||
}).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
done()
|
||||
this.$confirm('是否继续发布岗位?', {
|
||||
confirmButtonText: "继 续",
|
||||
cancelButtonText: "取 消",
|
||||
})
|
||||
.then(_ => {
|
||||
this.closed()
|
||||
})
|
||||
.catch(_ => {
|
||||
this.drawer = false;
|
||||
this.$emit("back");
|
||||
});
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
done();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
},
|
||||
@@ -1392,91 +1111,16 @@ export default {
|
||||
this.type = type;
|
||||
this.id = row.id;
|
||||
this.$nextTick(() => {
|
||||
if (type != 'edit') {
|
||||
// getLastTaskInfo().then(res=>{
|
||||
// const data=res.data.data;
|
||||
// this.obj.callName=data.callName;
|
||||
// this.obj.callTel=data.callTel;
|
||||
// })
|
||||
}
|
||||
|
||||
if (type === "copy") {
|
||||
this.title = "复制岗位";
|
||||
detail(row.id).then((res) => {
|
||||
if (![1, 2].includes(res.wageUnitCategory)) {
|
||||
res.wageUnitCategory = null;
|
||||
}
|
||||
this.obj = res;
|
||||
this.obj.etimePub = "";
|
||||
this.obj.stime = "";
|
||||
this.obj.etime = "";
|
||||
this.drawer = true;
|
||||
let tradeIdState = this.tradeIdAttr.indexOf(this.obj.tradeId);
|
||||
//判断有无此行业
|
||||
if (tradeIdState == -1) {
|
||||
this.obj.tradeId = "";
|
||||
setTimeout(() => {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "此岗位所包含行业已经不存在,请重新选择!",
|
||||
})
|
||||
}, 1000);
|
||||
} else {
|
||||
this.tradeState = this.obj.tradeNames;
|
||||
//判断有无此工种
|
||||
getWork(this.obj.tradeId).then((res) => {
|
||||
this.workData = res;
|
||||
this.workDataIdAttr = res.map((ele) => {
|
||||
return ele.id
|
||||
})
|
||||
let workDataIdState = this.workDataIdAttr.indexOf(this.obj.worktypeIds);
|
||||
//判断有无此工种
|
||||
if (workDataIdState == -1) {
|
||||
this.obj.worktypeIds = "";
|
||||
setTimeout(() => {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "此岗位所包含工种已经不存在,请重新选择!",
|
||||
})
|
||||
}, 1000);
|
||||
} else {
|
||||
this.workTypeState = this.obj.worktypeNames;
|
||||
getSkillList(this.obj.worktypeIds).then((res) => {
|
||||
this.skillIdAttr = res.data.data.records.map((ele) => {
|
||||
return ele;
|
||||
});
|
||||
let newSelectedSkills = [];
|
||||
this.skillIdAttr.forEach((val) => {
|
||||
let selectedSkillsState = this.obj.selectedSkills.find(v => v.id == val.id);
|
||||
if (selectedSkillsState) {
|
||||
newSelectedSkills.push(val);
|
||||
}
|
||||
})
|
||||
// 判断有无此技能
|
||||
if (newSelectedSkills.length == 0) {
|
||||
// setTimeout(()=>{
|
||||
// this.$message({
|
||||
// type: "error",
|
||||
// message: "此岗位所包含技能已经不存在,请重新选择!",
|
||||
// })
|
||||
// },1000);
|
||||
} else {
|
||||
this.selectedSkills = newSelectedSkills;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
} else if (type === "add") {
|
||||
if (type === "add") {
|
||||
this.title = "发布岗位";
|
||||
this.employerInfor = row
|
||||
this.obj = {
|
||||
wageUnitCategory: 3,
|
||||
sex: 0,
|
||||
ageDesc: "不限年龄",
|
||||
education: 7,
|
||||
experienceDesc: "不限经验",
|
||||
userNature: "灵活用工"
|
||||
userNature: "灵活用工",
|
||||
};
|
||||
this.selectedSkills = [];
|
||||
this.drawer = true;
|
||||
@@ -1486,67 +1130,6 @@ export default {
|
||||
if (this.$refs.selectMap) {
|
||||
this.$refs.selectMap.geolocation();
|
||||
}
|
||||
} else if (type === "edit") {
|
||||
this.title = "编辑岗位";
|
||||
detail(row.id).then((res) => {
|
||||
if (res.cityId === -1) {
|
||||
res.cityId = ''
|
||||
}
|
||||
this.obj = res;
|
||||
// this.obj.workSkills = []
|
||||
// console.log(res.worktypeIds)
|
||||
this.obj.workSkills = !res.worktypeIds || res.worktypeIds.split(',')
|
||||
// this.obj.workSkills.push(res.worktypeIds)
|
||||
// this.obj.workSkills.push(res.skillIds)
|
||||
this.drawer = true;
|
||||
// let tradeIdState = this.tradeIdAttr.indexOf(this.obj.tradeId);
|
||||
//判断有无此行业
|
||||
// if(tradeIdState == -1){
|
||||
// this.$message.closeAll();
|
||||
// this.obj.tradeId = "";
|
||||
// }else{
|
||||
// this.tradeState = this.obj.tradeNames;
|
||||
// //判断有无此工种
|
||||
// getWork(this.obj.tradeId).then((res) => {
|
||||
// this.workData = res;
|
||||
// this.workDataIdAttr = res.map((ele)=>{
|
||||
// return ele.id
|
||||
// })
|
||||
// let workDataIdState = this.workDataIdAttr.indexOf(this.obj.worktypeIds);
|
||||
// //判断有无此工种
|
||||
// if(workDataIdState == -1){
|
||||
// this.$message.closeAll();
|
||||
// this.obj.worktypeIds = "";
|
||||
// }else{
|
||||
// this.workTypeState = this.obj.worktypeNames;
|
||||
// getSkillList(this.obj.worktypeIds).then((res) => {
|
||||
// this.skillIdAttr = res.data.data.records.map((ele)=>{
|
||||
// return ele;
|
||||
// });
|
||||
// let newSelectedSkills = [];
|
||||
// this.skillIdAttr.forEach((val) => {
|
||||
// let selectedSkillsState = this.obj.selectedSkills.find(v => v.id == val.id);
|
||||
// if(selectedSkillsState){
|
||||
// newSelectedSkills.push(val);
|
||||
// }
|
||||
// })
|
||||
// // 判断有无此技能
|
||||
// if(newSelectedSkills.length == 0){
|
||||
// setTimeout(()=>{
|
||||
// this.$message.closeAll();
|
||||
// this.$message({
|
||||
// type: "error",
|
||||
// message: "此岗位所包含技能已经不存在,请重新选择!",
|
||||
// })
|
||||
// },1000);
|
||||
// }else{
|
||||
// this.selectedSkills = newSelectedSkills;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -1565,6 +1148,12 @@ export default {
|
||||
<style>
|
||||
.input-with-select {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.input-with-select span {
|
||||
width: 150px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.copy-form .el-input-group__append {
|
||||
@@ -1612,4 +1201,8 @@ export default {
|
||||
.tradeId .el-input--small input {
|
||||
padding-right: 150px;
|
||||
}
|
||||
|
||||
.el-drawer .avue-form {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user