岗位任务bug修复
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
></select-map>
|
||||
</template>
|
||||
<!-- 行业类型 -->
|
||||
<template slot="tradeId">
|
||||
<!-- <template slot="tradeId">
|
||||
<div class="tradeId">
|
||||
<el-autocomplete
|
||||
popper-class="my-autocomplete"
|
||||
@@ -66,7 +66,7 @@
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
</div>
|
||||
</template>
|
||||
</template> -->
|
||||
<!-- 工种 -->
|
||||
<template slot="worktypeIds">
|
||||
<div class="tradeId">
|
||||
@@ -462,21 +462,24 @@ export default {
|
||||
{
|
||||
label: "行业类型",
|
||||
prop: "tradeId",
|
||||
formslot: true,
|
||||
labelslot: false,
|
||||
errorslot: false,
|
||||
type: "select",
|
||||
dicData: this.tradeData,
|
||||
props: {
|
||||
label: "name",
|
||||
value: "id",
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
validator: tradeId,
|
||||
trigger: ["change", "blur"],
|
||||
// validator: tradeId,
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
span: 12,
|
||||
},
|
||||
{
|
||||
label: "工种",
|
||||
prop: "skillIds",
|
||||
prop: "workSkills",
|
||||
type: "cascader",
|
||||
search: true,
|
||||
display: true,
|
||||
@@ -967,21 +970,19 @@ export default {
|
||||
});
|
||||
}else{
|
||||
row.address = this.$refs.selectMap.addressLocation;
|
||||
let ids = [];
|
||||
let name = [];
|
||||
this.selectedSkills.forEach((ele) => {
|
||||
ids.push(ele.id);
|
||||
name.push(ele.name);
|
||||
});
|
||||
// let ids = [];
|
||||
// let name = [];
|
||||
// this.selectedSkills.forEach((ele) => {
|
||||
// ids.push(ele.id);
|
||||
// name.push(ele.name);
|
||||
// });
|
||||
if(this.skillArr && this.skillArr.length > 0) {
|
||||
this.skillArr.forEach(item => {
|
||||
if(item.id == row.skillIds[0]) {
|
||||
console.log(row.skillIds[0])
|
||||
if(item.id == row.workSkills[0]) {
|
||||
row.worktypeNames = item.name
|
||||
if(item.child && item.child.length > 0) {
|
||||
item.child.forEach(item2 => {
|
||||
if(item2.id == row.skillIds[1]) {
|
||||
console.log(row.skillIds[1])
|
||||
if(item2.id == row.workSkills[1]) {
|
||||
row.skillNames = item2.name;
|
||||
}
|
||||
})
|
||||
@@ -989,6 +990,16 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if(this.tradeData && this.tradeData.length > 0) {
|
||||
this.tradeData.forEach(item => {
|
||||
if(row.tradeId == item.id) {
|
||||
row.tradeNames = item.name
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if (this.type === "add" || this.type === "copy") {
|
||||
this.$jlEvent("trialCheck")
|
||||
.then(() => {
|
||||
@@ -1002,10 +1013,10 @@ export default {
|
||||
wage: row.wage,
|
||||
wageUnitCategory: row.wageUnitCategory,
|
||||
tradeId: row.tradeId,
|
||||
tradeNames: this.obj.tradeNames,
|
||||
worktypeIds: row.skillIds[0],
|
||||
tradeNames: row.tradeNames,
|
||||
worktypeIds: row.workSkills[0],
|
||||
worktypeNames: row.worktypeNames,
|
||||
skillIds: row.skillIds[1],
|
||||
skillIds: row.workSkills[1],
|
||||
skillNames: row.skillNames,
|
||||
missionDesc: row.missionDesc,
|
||||
userNature: row.userNature,
|
||||
@@ -1055,9 +1066,10 @@ export default {
|
||||
wage: row.wage,
|
||||
wageUnitCategory: row.wageUnitCategory,
|
||||
tradeId: row.tradeId,
|
||||
worktypeIds: row.skillIds[0],
|
||||
tradeNames: row.tradeNames,
|
||||
worktypeIds: row.workSkills[0],
|
||||
worktypeNames: row.worktypeNames,
|
||||
skillIds: row.skillIds[1],
|
||||
skillIds: row.workSkills[1],
|
||||
skillNames: row.skillNames,
|
||||
missionDesc: row.missionDesc,
|
||||
userNature: row.userNature,
|
||||
@@ -1139,9 +1151,13 @@ export default {
|
||||
} else if (type === "edit") {
|
||||
this.title = "编辑任务";
|
||||
detail(row.missionNo).then((res) => {
|
||||
console.log(res)
|
||||
this.obj = res;
|
||||
this.obj.workSkills = []
|
||||
this.obj.workSkills.push(res.worktypeIds)
|
||||
this.obj.workSkills.push(res.skillIds)
|
||||
this.drawer = true;
|
||||
let tradeIdState = this.tradeIdAttr.indexOf(this.obj.tradeId);
|
||||
// let tradeIdState = this.tradeIdAttr.indexOf(this.obj.tradeId);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user