cyl/master-0804
wangxia 5 months ago
parent fcddc93528
commit c538338dd8

@ -1388,21 +1388,24 @@ export default {
}else{ }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.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 - that.jobDetail.monthPay.length * 20 , 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.jobSpecialLabelNames.length > 0) { if (that.jobDetail.jobSpecialLabelNames.length > 0) {
that.jobDetail.jobSpecialLabelNames.forEach((item1, index) => { that.jobDetail.jobSpecialLabelNames.forEach((item1, index) => {
if (index <= 3) { if (index <= 3) {
that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 80, line4 + 4, 500, 40, "#666", mainFontSize); that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 12, line4 + 4, 400, 40, "#666", mainFontSize); //
labelLeft += ctx.measureText(item1).width + 40; 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) { if (index == 3) {
labelLeft = 0; labelLeft = 0;
} }
} else if (index > 3 && index <= 6) { } else if (index > 3 && index <= 6) {
that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 80, line5 + 4, 500, 40, "#666", mainFontSize); that.G.roundRect1(ctx, baseLeft + labelLeft, line5 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012");
labelLeft += ctx.measureText(item1).width + 40; that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 12, line5 + 4, 400, 40, "#666", mainFontSize); //
labelLeft += ctx.measureText(item1).width + 42;
} }
}); });
} }
@ -1443,7 +1446,7 @@ export default {
// //
["安全保障", "工资保障", "补贴保障"].forEach((item1, index) => { ["安全保障", "工资保障", "补贴保障"].forEach((item1, index) => {
// //
that.G.fillTextLineBreak(ctx, item1, baseLeft + safeMarkPosition + 70, 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); that.G.roundRect(ctx, img1, baseLeft + safeMarkPosition - 36, line6 + 12, 32, 32, 12);
safeMarkPosition += 130 + ctx.measureText(item1).width; safeMarkPosition += 130 + ctx.measureText(item1).width;
}); });

@ -1257,8 +1257,8 @@ let data = {
// var initHeight = 0; // var initHeight = 0;
ctx.font = weight + " " + font + "px Arial"; //字体大小 ctx.font = weight + " " + font + "px Arial"; //字体大小
ctx.fillStyle = color; //字体颜色 ctx.fillStyle = color; //字体颜色
ctx.textBaseline = align; // ctx.textBaseline = align;
ctx.textAlign = align; // ctx.textAlign = align;
while (i < text.length) { while (i < text.length) {
while (ctx.measureText(text.substring(n, i)).width < lw && i < text.length) { while (ctx.measureText(text.substring(n, i)).width < lw && i < text.length) {
i++; i++;

Loading…
Cancel
Save