职位描述显示

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

@ -7,18 +7,14 @@
<g-loading />
</div>
<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"
style="height: 60px;"
>
<view class="r_box g_flex_row_between flex_center g_pl_16 g_pr_16 g_fs_16" @click="goUserMain" style="height: 60px">
<view class="g_fw_600 g_mr_4 g_flex_column_center">项目方</view>
<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="iconfont icon-gengduo11 g_fs_14 g_c_6 g_ml_4"></span>
</view>
</view>
<div class="r_box g_mb_10 g_mt_10 g_pl_16 g_pr_16 servicePrice" @click="showFee"
style="height: 60px;"
>
<div class="r_box g_mb_10 g_mt_10 g_pl_16 g_pr_16 servicePrice" @click="showFee" style="height: 60px">
<div class="g_flex_row_between flex_center g_fs_16">
<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>
@ -50,7 +46,7 @@
</view>
</template>
<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>
<view class="g_flex_row_between flex_center g_mt_8">
<view class="g_flex_row_start flex_center">
@ -60,8 +56,8 @@
</view>
</view>
<view v-if="corpUserFlag" class="g_flex_row_start g_c_main" @click.stop="setCopy('jobName')">
<view class="iconfont icon-fuzhi mr4" style ></view>
<span class="f14 ">复制</span>
<view class="iconfont icon-fuzhi mr4" style></view>
<span class="f14">复制</span>
</view>
</view>
<div>
@ -450,12 +446,8 @@
</button>
</div>
<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"
@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>
<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">
<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>
</button>
</div>
@ -557,7 +549,7 @@ export default {
},
onShareAppMessage() {
this.attention = false;
// return this.G.shareFun("/root/detail/job?id=" + this.jobDetail.id,
// return this.G.shareFun("/root/detail/job?id=" + this.jobDetail.id,
// "", this.jobDetail.jobName + " " + this.jobDetail.priceStr + " " + " ");
let that = this;
let path;
@ -569,9 +561,9 @@ export default {
return {
promise: new Promise((resolve, reject) => {
uni.showLoading({
title:'生成中'
})
setTimeout(()=>{
title: "生成中",
});
setTimeout(() => {
that.getWXCanvas("", "setShare").then((res) => {
wx.hideLoading();
resolve({
@ -580,7 +572,7 @@ export default {
path,
});
});
},100)
}, 100);
}),
};
},
@ -670,6 +662,12 @@ export default {
childrenType: ["面试地址", "面试评价", "面试时间", "面试注意事项", "项目驻场"],
children: [],
},
{
type: "其他",
show: false,
childrenType: ["职位描述"],
children: [],
},
],
};
},
@ -684,7 +682,7 @@ export default {
if (!uni.getStorageSync("apply-token")) {
console.log("apply-token");
uni.navigateTo({
url: "/root/person/loginIndex?type=detail&path=/root/detail/job&id="+ options.id,
url: "/root/person/loginIndex?type=detail&path=/root/detail/job&id=" + options.id,
});
return;
}
@ -709,52 +707,51 @@ export default {
this.IS_CREATOR = uni.getStorageSync("IS_CREATOR") == 1 ? true : false;
console.log("this.IS_CREATOR", this.IS_CREATOR);
this.corpUserFlag = uni.getStorageSync("apply-userinfo").corpUserFlag;
if(uni.getStorageSync("apply-token")){
this.getIgnore();
this.getDetail().then((res) => {
console.log("res", res);
let objMiddle = res.cozeStructureRes ? JSON.parse(res.cozeStructureRes) : {};
// let objMiddle = JSON.parse(res.cozeStructureRes);
console.log("objMiddle", objMiddle);
delete objMiddle["佣金"];
delete objMiddle["佣金详情"];
delete objMiddle["企业位置"];
delete objMiddle["职位标签"];
delete objMiddle["职位标题"];
delete objMiddle["职位分类"];
delete objMiddle["项目驻场"];
let num1 = 1;
this.templateArr.forEach((item) => {
let num = 1;
item.children = [];
item.childrenType.forEach((innerItem) => {
item.children.push({
key: innerItem,
value: objMiddle[innerItem],
num,
show: objMiddle[innerItem] ? true : false,
edit: false,
if (uni.getStorageSync("apply-token")) {
this.getIgnore();
this.getDetail().then((res) => {
console.log("res", res);
let objMiddle = res.cozeStructureRes ? JSON.parse(res.cozeStructureRes) : {};
// let objMiddle = JSON.parse(res.cozeStructureRes);
console.log("objMiddle", objMiddle);
delete objMiddle["佣金"];
delete objMiddle["佣金详情"];
delete objMiddle["企业位置"];
delete objMiddle["职位标签"];
delete objMiddle["职位标题"];
delete objMiddle["职位分类"];
delete objMiddle["项目驻场"];
let num1 = 1;
this.templateArr.forEach((item) => {
let num = 0;
item.children = [];
item.childrenType.forEach((innerItem) => {
if (objMiddle[innerItem]) {
num++;
}
item.children.push({
key: innerItem,
value: objMiddle[innerItem],
num,
show: objMiddle[innerItem] ? true : false,
edit: false,
});
});
if (objMiddle[innerItem]) {
num++;
item.num = num1;
if (item.children[item.children.length - 1].num != 0) {
item.show = true;
num1++;
}
});
item.num = num1;
if (item.children[item.children.length - 1].num != 1) {
item.show = true;
num1++;
}
this.toKnowInfo(res.agencyId);
});
this.toKnowInfo(res.agencyId);
});
}
}
uni.getSystemInfo({
success: function (res) {
console.log(res);
that.wxPlat = res.hostName;
},
});
},
methods: {
@ -922,8 +919,6 @@ export default {
} else {
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 reg = /1[3456789]\d{9}/g;
var phone = str.match(reg);
@ -1275,9 +1270,7 @@ export default {
},
goIm() {
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.api.wyyx_create,
{
@ -1296,7 +1289,7 @@ export default {
jobDetail: {
title: that.jobDetail.jobName,
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,
serviceFee: that.jobDetail.fuWuFei,
monthPay: that.jobDetail.monthPay,
@ -1313,7 +1306,7 @@ export default {
},
() => {}
);
})
});
},
//
getWXCanvas(sharelImg, type) {
@ -1365,7 +1358,7 @@ export default {
mainFontSize = 36; //
titleFontSize = 56; //
let dis = 0,
labelHeight = 0;
labelHeight = 0;
line1 = 0; //
line2 = 90 - dis;
line3 = 200 - dis;
@ -1373,44 +1366,42 @@ export default {
line5 = 350 - dis - labelHeight;
line6 = 380 - dis - labelHeight - 0;
line7 = 460 - dis - labelHeight;
//
console.log("that.jobDetail", that.jobDetail);
that.G.roundRect1(ctx, 0, 0, 750, 600, 0, "#fff");
return new Promise(function (imgres) {
//
that.G.fillTextLineBreak(ctx, that.jobDetail.jobName, baseLeft, line2, 800, 20, "#000", titleFontSize, "500", "left");
that.G.fillTextLineBreak(ctx, that.jobDetail.jobName, baseLeft, line2, 800, 20, "#000", titleFontSize, "500", "left");
//
if(that.G.getSalaryClassifyValue(that.jobDetail.salaryClassify, that.jobDetail.salaryClassifyValue) == "0-0元/月"){
if (that.G.getSalaryClassifyValue(that.jobDetail.salaryClassify, that.jobDetail.salaryClassifyValue) == "0-0元/月") {
//
that.G.fillTextLineBreak(ctx, that.jobDetail.priceStr, baseLeft, line3, 600, 40, "#ff4400", titleFontSize + 6, "600", "left");
}else{
that.G.fillTextLineBreak(ctx, that.jobDetail.priceStr, baseLeft, line3, 600, 40, "#ff4400", titleFontSize + 6, "600", "left");
} else {
//
that.G.fillTextLineBreak(ctx, that.G.getSalaryClassifyValue(that.jobDetail.salaryClassify, that.jobDetail.salaryClassifyValue), baseLeft, line3, 400, 40, "#ff4400", titleFontSize + 6, "600", "left");
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.G.getSalaryClassifyValue(that.jobDetail.salaryClassify, that.jobDetail.salaryClassifyValue), baseLeft, line3, 400, 40, "#ff4400", titleFontSize + 6, "600", "left");
that.G.fillTextLineBreak(ctx, that.jobDetail.monthPay, 750 - ctx.measureText(that.jobDetail.monthPay).width, line3 + 6, 400, 20, "#ff4400", titleFontSize, "400");
}
if (that.jobDetail.jobSpecialLabelNames.length > 0) {
that.jobDetail.jobSpecialLabelNames.forEach((item1, index) => {
if (that.jobDetail.jobRequestLabelNames.length > 0) {
that.jobDetail.jobRequestLabelNames.forEach((item1, index) => {
if (index <= 3) {
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");
labelLeft += ctx.measureText(item1).width + 42;
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");
labelLeft += ctx.measureText(item1).width + 42;
if (index == 3) {
labelLeft = 0;
}
} else if (index > 3 && index <= 6) {
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); //
labelLeft += ctx.measureText(item1).width + 42;
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); //
labelLeft += ctx.measureText(item1).width + 42;
}
});
}
// else if (that.jobDetail.jobSpecialLabelNames.length > 0) {
// that.jobDetail.jobSpecialLabelNames.forEach((item1, index) => {
// else if (that.jobDetail.jobRequestLabelNames.length > 0) {
// that.jobDetail.jobRequestLabelNames.forEach((item1, index) => {
// // if (index <= 3) {
// 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");
@ -1446,7 +1437,7 @@ export default {
//
["安全保障", "工资保障", "补贴保障"].forEach((item1, index) => {
//
that.G.fillTextLineBreak(ctx, item1, baseLeft + safeMarkPosition , line6 + 40, 100, 32, "#fca025");
that.G.fillTextLineBreak(ctx, item1, baseLeft + safeMarkPosition, line6 + 40, 100, 32, "#fca025");
that.G.roundRect(ctx, img1, baseLeft + safeMarkPosition - 36, line6 + 12, 32, 32, 12);
safeMarkPosition += 130 + ctx.measureText(item1).width;
});
@ -1601,7 +1592,7 @@ export default {
color: #333;
}
}
.g_hs_67{
.g_hs_67 {
height: 60px;
}
</style>

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

Loading…
Cancel
Save