职位描述显示

cyl/master-0804
wangxia 4 months ago
parent c8bad587f4
commit 53d1b5a69b

@ -7,18 +7,14 @@
<g-loading /> <g-loading />
</div> </div>
<div v-if="speed == 1"> <div v-if="speed == 1">
<view class="r_box g_flex_row_between flex_center g_pl_16 g_pr_16 g_fs_16" @click="goUserMain" <view class="r_box g_flex_row_between flex_center g_pl_16 g_pr_16 g_fs_16" @click="goUserMain" style="height: 60px">
style="height: 60px;"
>
<view class="g_fw_600 g_mr_4 g_flex_column_center">项目方</view> <view class="g_fw_600 g_mr_4 g_flex_column_center">项目方</view>
<view class="g_flex_row_end flex_center g_flex_1"> <view class="g_flex_row_end flex_center g_flex_1">
<span class="g_c_6" selectable="false" space="false" decode="false">{{ jobDetail.fullName ? jobDetail.fullName : jobDetail.agencyName }}</span> <span class="g_c_6" selectable="false" space="false" decode="false">{{ jobDetail.fullName ? jobDetail.fullName : jobDetail.agencyName }}</span>
<span class="iconfont icon-gengduo11 g_fs_14 g_c_6 g_ml_4"></span> <span class="iconfont icon-gengduo11 g_fs_14 g_c_6 g_ml_4"></span>
</view> </view>
</view> </view>
<div class="r_box g_mb_10 g_mt_10 g_pl_16 g_pr_16 servicePrice" @click="showFee" <div class="r_box g_mb_10 g_mt_10 g_pl_16 g_pr_16 servicePrice" @click="showFee" style="height: 60px">
style="height: 60px;"
>
<div class="g_flex_row_between flex_center g_fs_16"> <div class="g_flex_row_between flex_center g_fs_16">
<div class="g_flex_row_start" style="flex: none"> <div class="g_flex_row_start" style="flex: none">
<div class="g_fw_600 g_mr_4 g_hs_67 g_flex_column_center">代理佣金</div> <div class="g_fw_600 g_mr_4 g_hs_67 g_flex_column_center">代理佣金</div>
@ -50,7 +46,7 @@
</view> </view>
</template> </template>
<div class="g_flex_row_start"> <div class="g_flex_row_start">
<div v-for="(item, index) in jobDetail.jobSpecialLabelNames" class="g_mr_8 g_mb_8 g_pl_4 g_pr_4" :style="{ color: labelColor[index % labelColor.length], 'background-color': bgColor[index % bgColor.length] }">{{ item }}</div> <div v-for="(item, index) in jobDetail.jobRequestLabelNames" class="g_mr_8 g_mb_8 g_pl_4 g_pr_4" :style="{ color: labelColor[index % labelColor.length], 'background-color': bgColor[index % bgColor.length] }">{{ item }}</div>
</div> </div>
<view class="g_flex_row_between flex_center g_mt_8"> <view class="g_flex_row_between flex_center g_mt_8">
<view class="g_flex_row_start flex_center"> <view class="g_flex_row_start flex_center">
@ -450,12 +446,8 @@
</button> </button>
</div> </div>
<div class="g_flex_none g_flex_column_center" v-if="false"> <div class="g_flex_none g_flex_column_center" v-if="false">
<button class="g_pl_0 g_pr_0 g_bg_f g_mr_12 g_w_36" hover-class="thover" style="line-height: 1; border-radius: 0" <button class="g_pl_0 g_pr_0 g_bg_f g_mr_12 g_w_36" hover-class="thover" style="line-height: 1; border-radius: 0" @click="goIm">
@click="goIm" <icon class="iconfont icon-xiaoxi" style="color: #787878; line-height: 1; margin-top: -5px; font-size: 20px !important; position: relative; top: 3px"></icon>
>
<icon class="iconfont icon-xiaoxi"
style="color: #787878; line-height: 1; margin-top: -5px;font-size: 20px !important;position: relative;top: 3px;"
></icon>
<div class="g_fs_12 g_c_6" style="margin-top: 8px">IM</div> <div class="g_fs_12 g_c_6" style="margin-top: 8px">IM</div>
</button> </button>
</div> </div>
@ -569,8 +561,8 @@ export default {
return { return {
promise: new Promise((resolve, reject) => { promise: new Promise((resolve, reject) => {
uni.showLoading({ uni.showLoading({
title:'生成中' title: "生成中",
}) });
setTimeout(() => { setTimeout(() => {
that.getWXCanvas("", "setShare").then((res) => { that.getWXCanvas("", "setShare").then((res) => {
wx.hideLoading(); wx.hideLoading();
@ -580,7 +572,7 @@ export default {
path, path,
}); });
}); });
},100) }, 100);
}), }),
}; };
}, },
@ -670,6 +662,12 @@ export default {
childrenType: ["面试地址", "面试评价", "面试时间", "面试注意事项", "项目驻场"], childrenType: ["面试地址", "面试评价", "面试时间", "面试注意事项", "项目驻场"],
children: [], children: [],
}, },
{
type: "其他",
show: false,
childrenType: ["职位描述"],
children: [],
},
], ],
}; };
}, },
@ -725,9 +723,12 @@ export default {
delete objMiddle["项目驻场"]; delete objMiddle["项目驻场"];
let num1 = 1; let num1 = 1;
this.templateArr.forEach((item) => { this.templateArr.forEach((item) => {
let num = 1; let num = 0;
item.children = []; item.children = [];
item.childrenType.forEach((innerItem) => { item.childrenType.forEach((innerItem) => {
if (objMiddle[innerItem]) {
num++;
}
item.children.push({ item.children.push({
key: innerItem, key: innerItem,
value: objMiddle[innerItem], value: objMiddle[innerItem],
@ -735,12 +736,9 @@ export default {
show: objMiddle[innerItem] ? true : false, show: objMiddle[innerItem] ? true : false,
edit: false, edit: false,
}); });
if (objMiddle[innerItem]) {
num++;
}
}); });
item.num = num1; item.num = num1;
if (item.children[item.children.length - 1].num != 1) { if (item.children[item.children.length - 1].num != 0) {
item.show = true; item.show = true;
num1++; num1++;
} }
@ -754,7 +752,6 @@ export default {
that.wxPlat = res.hostName; that.wxPlat = res.hostName;
}, },
}); });
}, },
methods: { methods: {
@ -922,8 +919,6 @@ export default {
} else { } else {
that.jobDetail.jobInfo = that.jobDetail.jobInfo.replace(/\*\*\*\*\*/g, ""); that.jobDetail.jobInfo = that.jobDetail.jobInfo.replace(/\*\*\*\*\*/g, "");
} }
// that.jobDetail.jobRequestLabelNamesList = that.jobDetail.jobRequestLabelNames.split(",");
// that.jobDetail.jobSpecialLabelNamesList = that.jobDetail.jobSpecialLabelNames.split(",");
var str = that.jobDetail.supplier; var str = that.jobDetail.supplier;
var reg = /1[3456789]\d{9}/g; var reg = /1[3456789]\d{9}/g;
var phone = str.match(reg); var phone = str.match(reg);
@ -1275,9 +1270,7 @@ export default {
}, },
goIm() { goIm() {
let that = this; let that = this;
that.F.wyyxGet(that.api.job_get_cus + '?jobId=' + that.jobDetail.id,{},(cusData)=>{ that.F.wyyxGet(that.api.job_get_cus + "?jobId=" + that.jobDetail.id, {}, (cusData) => {
that.F.wyyxPost( that.F.wyyxPost(
that.api.wyyx_create, that.api.wyyx_create,
{ {
@ -1296,7 +1289,7 @@ export default {
jobDetail: { jobDetail: {
title: that.jobDetail.jobName, title: that.jobDetail.jobName,
info: (that.jobDetail.addss ? that.jobDetail.addss + "丨" : "") + that.jobDetail.genderRestrict + "丨" + that.jobDetail.age, info: (that.jobDetail.addss ? that.jobDetail.addss + "丨" : "") + that.jobDetail.genderRestrict + "丨" + that.jobDetail.age,
label: that.jobDetail.jobSpecialLabelNames.length > 0 ? that.jobDetail.jobSpecialLabelNames : "", label: that.jobDetail.jobRequestLabelNames.length > 0 ? that.jobDetail.jobRequestLabelNames : "",
salaryClassifyValue: that.jobDetail.priceStr, salaryClassifyValue: that.jobDetail.priceStr,
serviceFee: that.jobDetail.fuWuFei, serviceFee: that.jobDetail.fuWuFei,
monthPay: that.jobDetail.monthPay, monthPay: that.jobDetail.monthPay,
@ -1313,7 +1306,7 @@ export default {
}, },
() => {} () => {}
); );
}) });
}, },
// //
getWXCanvas(sharelImg, type) { getWXCanvas(sharelImg, type) {
@ -1391,9 +1384,8 @@ export default {
that.G.fillTextLineBreak(ctx, that.jobDetail.monthPay, 750 - ctx.measureText(that.jobDetail.monthPay).width, line3 + 6, 400, 20, "#ff4400", titleFontSize, "400"); that.G.fillTextLineBreak(ctx, that.jobDetail.monthPay, 750 - ctx.measureText(that.jobDetail.monthPay).width, line3 + 6, 400, 20, "#ff4400", titleFontSize, "400");
} }
if (that.jobDetail.jobRequestLabelNames.length > 0) {
if (that.jobDetail.jobSpecialLabelNames.length > 0) { that.jobDetail.jobRequestLabelNames.forEach((item1, index) => {
that.jobDetail.jobSpecialLabelNames.forEach((item1, index) => {
if (index <= 3) { if (index <= 3) {
that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 12, line4 + 4, 400, 40, "#666", mainFontSize); // that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 12, line4 + 4, 400, 40, "#666", mainFontSize); //
that.G.roundRect1(ctx, baseLeft + labelLeft, line4 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012"); that.G.roundRect1(ctx, baseLeft + labelLeft, line4 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012");
@ -1405,12 +1397,11 @@ export default {
that.G.roundRect1(ctx, baseLeft + labelLeft, line5 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012"); that.G.roundRect1(ctx, baseLeft + labelLeft, line5 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012");
that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 12, line5 + 4, 400, 40, "#666", mainFontSize); // that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 12, line5 + 4, 400, 40, "#666", mainFontSize); //
labelLeft += ctx.measureText(item1).width + 42; labelLeft += ctx.measureText(item1).width + 42;
} }
}); });
} }
// else if (that.jobDetail.jobSpecialLabelNames.length > 0) { // else if (that.jobDetail.jobRequestLabelNames.length > 0) {
// that.jobDetail.jobSpecialLabelNames.forEach((item1, index) => { // that.jobDetail.jobRequestLabelNames.forEach((item1, index) => {
// // if (index <= 3) { // // if (index <= 3) {
// that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 80, line4 + 4, 400, 40, "#666", mainFontSize); // // that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 80, line4 + 4, 400, 40, "#666", mainFontSize); //
// // that.G.roundRect1(ctx, baseLeft + labelLeft, line4 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012"); // // that.G.roundRect1(ctx, baseLeft + labelLeft, line4 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012");

@ -672,18 +672,18 @@ let data = {
} }
item["district"] = districtStr; item["district"] = districtStr;
//职位特色 //职位特色
item["jobSpecialLabelNames"] = that.getJobSpecialLabelNamesArray(item.jobSpecialLabelNames); item["jobRequestLabelNames"] = that.getjobRequestLabelNamesArray(item.jobRequestLabelNames);
// 特色标签 // 特色标签
const jobSpecialLabelNames = []; const jobRequestLabelNames = [];
if (that.isNotEmptyCheck(item.jobSpecialLabelNames) && Array.isArray(item.jobSpecialLabelNames)) { if (that.isNotEmptyCheck(item.jobRequestLabelNames) && Array.isArray(item.jobRequestLabelNames)) {
item.jobSpecialLabelNames.forEach((item, index) => { item.jobRequestLabelNames.forEach((item, index) => {
if (index <= 2) { if (index <= 2) {
jobSpecialLabelNames.push(item); jobRequestLabelNames.push(item);
} else { } else {
return; return;
} }
}); });
item.jobSpecialLabelNames = jobSpecialLabelNames; item.jobRequestLabelNames = jobRequestLabelNames;
} }
// 年龄限制 // 年龄限制
if (Boolean(item.minAgeWoman) === true && Boolean(item.minAgeMan) === false) { if (Boolean(item.minAgeWoman) === true && Boolean(item.minAgeMan) === false) {
@ -774,30 +774,17 @@ let data = {
// console.log(districtStr); // console.log(districtStr);
jobList["district"] = districtStr; jobList["district"] = districtStr;
//职位特色 //职位特色
jobList["jobSpecialLabelNames"] = that.getJobSpecialLabelNamesArray(jobList.jobSpecialLabelNames); jobList["jobRequestLabelNames"] = that.getjobRequestLabelNamesArray(jobList.jobRequestLabelNames);
jobList["jobRequestLabelNames"] = that.getJobSpecialLabelNamesArray(jobList.jobRequestLabelNames); const jobRequestLabelNames1 = [];
// 特色标签
const jobSpecialLabelNames = [];
if (that.isNotEmptyCheck(jobList.jobSpecialLabelNames) && Array.isArray(jobList.jobSpecialLabelNames)) {
jobList.jobSpecialLabelNames.forEach((item, index) => {
// if (index <= 4) {
jobSpecialLabelNames.push(item);
// } else {
// return;
// }
});
jobList.jobSpecialLabelNames = jobSpecialLabelNames;
}
const jobSpecialLabelNames1 = [];
if (that.isNotEmptyCheck(jobList.jobRequestLabelNames) && Array.isArray(jobList.jobRequestLabelNames)) { if (that.isNotEmptyCheck(jobList.jobRequestLabelNames) && Array.isArray(jobList.jobRequestLabelNames)) {
jobList.jobRequestLabelNames.forEach((item, index) => { jobList.jobRequestLabelNames.forEach((item, index) => {
// if (index <= 4) { // if (index <= 4) {
jobSpecialLabelNames1.push(item); jobRequestLabelNames1.push(item);
// } else { // } else {
// return; // return;
// } // }
}); });
jobList.jobRequestLabelNames = jobSpecialLabelNames1; jobList.jobRequestLabelNames = jobRequestLabelNames1;
} }
} }
} }
@ -931,9 +918,9 @@ let data = {
} }
return obj; return obj;
}, },
getJobSpecialLabelNamesArray (jobSpecialLabelNames) { getjobRequestLabelNamesArray (jobRequestLabelNames) {
if (this.isNotEmptyCheck(jobSpecialLabelNames)) { if (this.isNotEmptyCheck(jobRequestLabelNames)) {
return jobSpecialLabelNames.split(", "); return jobRequestLabelNames.split(", ");
} }
return []; return [];
}, },
@ -1409,7 +1396,7 @@ let data = {
//职位特色 //职位特色
item.jobSpecialLabelNameArray = []; item.jobSpecialLabelNameArray = [];
that.getJobSpecialLabelNamesArray(item.jobSpecialLabelNames).forEach((i, index) => { that.getjobRequestLabelNamesArray(item.jobRequestLabelNames).forEach((i, index) => {
// if (index <= 3) { // if (index <= 3) {
item["jobSpecialLabelNameArray"].push(i); item["jobSpecialLabelNameArray"].push(i);
// } // }

Loading…
Cancel
Save