flat: 暂存
This commit is contained in:
@@ -114,7 +114,7 @@ export default {
|
|||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: "公司名称",
|
label: "公司名称",
|
||||||
prop: "companyName",
|
prop: "comname",
|
||||||
search: true,
|
search: true,
|
||||||
display: false,
|
display: false,
|
||||||
},
|
},
|
||||||
@@ -166,7 +166,7 @@ export default {
|
|||||||
span: 12,
|
span: 12,
|
||||||
display: true,
|
display: true,
|
||||||
size: "small",
|
size: "small",
|
||||||
prop: "companyName",
|
prop: "comname",
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ export default {
|
|||||||
days:null,//某个月份的天数
|
days:null,//某个月份的天数
|
||||||
endTimeFlag:true,
|
endTimeFlag:true,
|
||||||
stimeDate:null,
|
stimeDate:null,
|
||||||
|
workTypesNameList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -544,9 +545,7 @@ export default {
|
|||||||
search: true,
|
search: true,
|
||||||
display: true,
|
display: true,
|
||||||
dicUrl: `/api/jobslink-api/tenant/worktypes/base/list?type=2`,
|
dicUrl: `/api/jobslink-api/tenant/worktypes/base/list?type=2`,
|
||||||
dicFormatter: (res) => {
|
dicFormatter: this.workSkillList,
|
||||||
return res.data; //返回字典的层级结构
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
label: "name",
|
label: "name",
|
||||||
value: "id",
|
value: "id",
|
||||||
@@ -843,6 +842,20 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
workSkillList(res) {
|
||||||
|
this.workTypesNameList = res.data
|
||||||
|
const Deliver = (children, obj = {}) => {
|
||||||
|
children.forEach((item) => {
|
||||||
|
obj[item.id] = item.name
|
||||||
|
if (item.child) {
|
||||||
|
return Deliver(item.child, obj)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
this.workTypesNameObj = Deliver(res.data)
|
||||||
|
return res.data
|
||||||
|
},
|
||||||
//过滤行业类型
|
//过滤行业类型
|
||||||
querySearchAsync(queryString, cb) {
|
querySearchAsync(queryString, cb) {
|
||||||
let results = [];
|
let results = [];
|
||||||
@@ -1021,12 +1034,12 @@ export default {
|
|||||||
},
|
},
|
||||||
submit(row, done) {
|
submit(row, done) {
|
||||||
if(this.$refs.selectMap.addressLocation == ""){
|
if(this.$refs.selectMap.addressLocation == ""){
|
||||||
this.$message({
|
return this.$message({
|
||||||
type: "error",
|
type: "error",
|
||||||
message: "请选择详细地址!",
|
message: "请选择详细地址!",
|
||||||
});
|
});
|
||||||
}else{
|
}
|
||||||
row.address = this.$refs.selectMap.addressLocation;
|
row.address = this.$refs.selectMap.addressLocation;
|
||||||
// let ids = [];
|
// let ids = [];
|
||||||
// let name = [];
|
// let name = [];
|
||||||
// this.selectedSkills.forEach((ele) => {
|
// this.selectedSkills.forEach((ele) => {
|
||||||
@@ -1057,7 +1070,11 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const copy = JSON.parse(JSON.stringify(row))
|
||||||
|
row.worktypeIds = copy.workSkills.join(',')
|
||||||
|
row.worktypeNames = copy.workSkills.map((id) => this.workTypesNameObj[id]).join(',')
|
||||||
|
console.log(row)
|
||||||
|
// 修改原数据workSkills
|
||||||
if (this.type === "add" || this.type === "copy") {
|
if (this.type === "add" || this.type === "copy") {
|
||||||
this.$jlEvent("trialCheck")
|
this.$jlEvent("trialCheck")
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -1072,7 +1089,7 @@ export default {
|
|||||||
wageUnitCategory: row.wageUnitCategory,
|
wageUnitCategory: row.wageUnitCategory,
|
||||||
tradeId: row.tradeId,
|
tradeId: row.tradeId,
|
||||||
tradeNames: row.tradeNames,
|
tradeNames: row.tradeNames,
|
||||||
worktypeIds: row.workSkills[0],
|
worktypeIds: row.workSkills,
|
||||||
worktypeNames: row.worktypeNames,
|
worktypeNames: row.worktypeNames,
|
||||||
skillIds: row.workSkills[1],
|
skillIds: row.workSkills[1],
|
||||||
skillNames: row.skillNames,
|
skillNames: row.skillNames,
|
||||||
@@ -1125,7 +1142,7 @@ export default {
|
|||||||
wageUnitCategory: row.wageUnitCategory,
|
wageUnitCategory: row.wageUnitCategory,
|
||||||
tradeId: row.tradeId,
|
tradeId: row.tradeId,
|
||||||
tradeNames: row.tradeNames,
|
tradeNames: row.tradeNames,
|
||||||
worktypeIds: row.workSkills[0],
|
worktypeIds: row.worktypeIds,
|
||||||
worktypeNames: row.worktypeNames,
|
worktypeNames: row.worktypeNames,
|
||||||
skillIds: row.workSkills[1],
|
skillIds: row.workSkills[1],
|
||||||
skillNames: row.skillNames,
|
skillNames: row.skillNames,
|
||||||
@@ -1158,7 +1175,6 @@ export default {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
clearValidator(val){
|
clearValidator(val){
|
||||||
@@ -1266,9 +1282,12 @@ export default {
|
|||||||
this.title = "编辑岗位";
|
this.title = "编辑岗位";
|
||||||
detail(row.id).then((res) => {
|
detail(row.id).then((res) => {
|
||||||
this.obj = res;
|
this.obj = res;
|
||||||
this.obj.workSkills = []
|
// this.obj.workSkills = []
|
||||||
this.obj.workSkills.push(res.worktypeIds)
|
// console.log(res.worktypeIds)
|
||||||
this.obj.workSkills.push(res.skillIds)
|
this.obj.workSkills = res.worktypeIds.split(',')
|
||||||
|
console.log(res, this.obj)
|
||||||
|
// this.obj.workSkills.push(res.worktypeIds)
|
||||||
|
// this.obj.workSkills.push(res.skillIds)
|
||||||
this.drawer = true;
|
this.drawer = true;
|
||||||
// let tradeIdState = this.tradeIdAttr.indexOf(this.obj.tradeId);
|
// let tradeIdState = this.tradeIdAttr.indexOf(this.obj.tradeId);
|
||||||
//判断有无此行业
|
//判断有无此行业
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ module.exports = {
|
|||||||
port: 1888,
|
port: 1888,
|
||||||
proxy: {
|
proxy: {
|
||||||
"/api": {
|
"/api": {
|
||||||
target: 'http://localhost:8000',
|
// target: 'http://localhost:8000',
|
||||||
|
// target: 'http://192.168.3.120:8000',
|
||||||
|
target: 'http://192.168.1.106:8000',
|
||||||
|
// target: 'http://10.165.0.173:8000',
|
||||||
ws: true,
|
ws: true,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
|
|||||||
Reference in New Issue
Block a user