From 5d8a4d6ac23c05e45ed94e3336683d8cdc21a6f4 Mon Sep 17 00:00:00 2001 From: zxy <353513737@qq.com> Date: Tue, 27 Feb 2024 22:19:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenant/mission/Dialog/CopyMission.vue | 80 ++++--------------- src/views/util/mission-view.vue | 2 +- src/views/util/work-view.vue | 2 +- 3 files changed, 18 insertions(+), 66 deletions(-) diff --git a/src/views/tenant/mission/Dialog/CopyMission.vue b/src/views/tenant/mission/Dialog/CopyMission.vue index cacbc1a..519d0b8 100644 --- a/src/views/tenant/mission/Dialog/CopyMission.vue +++ b/src/views/tenant/mission/Dialog/CopyMission.vue @@ -109,9 +109,7 @@ import { wageUnitCategoryState, wageOptionsWithNoMonth, educationState, - // genderState, } from "@/common/dic"; -// import { toCent } from "@/util/money"; const validateTel = (rule, value, callback) => { if (isvalidatemobile(value)[0]) { @@ -124,6 +122,7 @@ const validateTel = (rule, value, callback) => { export default { data() { return { + skillArr: [], id: "", title: "", type: "", @@ -371,10 +370,6 @@ export default { if(value){ self.stimeDate=value.split(' ')[0] self.endTimeFlag=false - // let date=value.split(' ')[0] - // getMounthDays(date).then(res=>{ - // self.days=res.data.data; - // }) } else{ self.endTimeFlag=true @@ -459,8 +454,6 @@ export default { rules: [ { required: true, - // whitespace: true, - // validator: wage, trigger: "blur", }, ], @@ -472,12 +465,6 @@ export default { formslot: true, labelslot: false, errorslot: false, - // type: "tree", - // dicData: self.tradeData, - // props: { - // label: "name", - // value: "id", - // }, rules: [ { required: true, @@ -489,11 +476,10 @@ export default { }, { label: "工种", - prop: "worktypeIds", + prop: "skillIds", type: "tree", search: true, display: true, - // width: '150', dicUrl: `/api/jobslink-api/tenant/worktypes/base/list?type=1`, dicFormatter: (res) => { return res.data; //返回字典的层级结构 @@ -502,46 +488,15 @@ export default { label: "name", value: "id", }, - // props: { - // label: "groupName", - // value: "id", - // }, - // formslot: true, - // labelslot: false, rules: [ { required: true, - // validator: workType, message: "请输入工种", - // trigger: ["change", "blur"], trigger: "blur", }, ], - // dicData: self.workData, - // props: { - // label: "name", - // value: "id", - // }, - // rules: [ - // { - // required: true, - // message: "请选择工种", - // trigger: ["change"], - // }, - // ], span: 12, }, - // { - // label: "技能要求", - // prop: "skillIds", - // formslot: true, - // labelslot: false, - // errorslot: false, - // rules: [ - // { required: true, validator: skill, trigger: "change" }, - // ], - // span: 24, - // }, { label: "任务描述", prop: "missionDesc", @@ -591,15 +546,6 @@ export default { ], span: 8, }, - // { - // label: "性别要求", - // type: "radio", - // prop: "sex", - // dicData: genderState, - // span: 10, - // offset: 6, - // clearable: false, - // }, { label: "年龄要求", type: "select", @@ -979,6 +925,7 @@ export default { // 获取工种 getWorkTypes(1).then(res => { console.log(res) + this.skillArr = res.data.data; }) }, closed() { @@ -1025,8 +972,13 @@ export default { ids.push(ele.id); name.push(ele.name); }); - let skillIds = ids.join(","); - let skillNames = name.join(","); + if(this.skillArr && this.skillArr.length > 0) { + this.skillArr.forEach(item => { + if(item.id == row.skillIds) { + row.skillNames = item.name + } + }) + } if (this.type === "add" || this.type === "copy") { this.$jlEvent("trialCheck") .then(() => { @@ -1041,9 +993,9 @@ export default { wageUnitCategory: row.wageUnitCategory, tradeId: row.tradeId, tradeNames: this.obj.tradeNames, - worktypeIds: row.worktypeIds, - skillIds: skillIds, - skillNames: skillNames, + worktypeIds: row.skillIds, + skillIds: row.skillIds, + skillNames: row.skillNames, missionDesc: row.missionDesc, userNature: row.userNature, sex: row.sex, @@ -1092,9 +1044,9 @@ export default { wage: row.wage, wageUnitCategory: row.wageUnitCategory, tradeId: row.tradeId, - worktypeIds: row.worktypeIds, - skillIds: skillIds, - skillNames: skillNames, + worktypeIds: row.skillIds, + skillIds: row.skillIds, + skillNames: row.skillNames, missionDesc: row.missionDesc, userNature: row.userNature, sex: row.sex, diff --git a/src/views/util/mission-view.vue b/src/views/util/mission-view.vue index 5481eb0..c5388a4 100644 --- a/src/views/util/mission-view.vue +++ b/src/views/util/mission-view.vue @@ -57,7 +57,7 @@ - {{ model.worktypeNames }} + {{ model.skillNames }} diff --git a/src/views/util/work-view.vue b/src/views/util/work-view.vue index e1308c1..afe512c 100644 --- a/src/views/util/work-view.vue +++ b/src/views/util/work-view.vue @@ -59,7 +59,7 @@ - {{ model.worktypeNames }} + {{ model.skillNames }}