style:证书预览
Showing
2 changed files
with
25 additions
and
5 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2024-01-18 11:00:00 | 4 | * @LastEditTime: 2024-01-18 11:04:53 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div> | 7 | <div> |
... | @@ -269,7 +269,18 @@ | ... | @@ -269,7 +269,18 @@ |
269 | context.fillStyle = '#000000'; | 269 | context.fillStyle = '#000000'; |
270 | context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 60, 56); | 270 | context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 60, 56); |
271 | context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 113, 56); | 271 | context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 113, 56); |
272 | context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 180, 56); | 272 | // context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 180, 56); |
273 | |||
274 | if (getByteLen(this.bdcqz.sxqc) > 14) { | ||
275 | const originalFont = context.font; | ||
276 | // 设置新的字体大小 | ||
277 | context.font = '14px 楷体'; // 替换为你想要的字体和大小 | ||
278 | // 绘制 bdcdyh | ||
279 | context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 165, 56); | ||
280 | // 恢复原始字体设置 | ||
281 | context.font = originalFont; | ||
282 | } | ||
283 | |||
273 | context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 370, 56); | 284 | context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 370, 56); |
274 | context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 129, 97); | 285 | context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 129, 97); |
275 | context.fillText(this.bdcqz.gyqk ? this.bdcqz.gyqk : '', 129, 136); | 286 | context.fillText(this.bdcqz.gyqk ? this.bdcqz.gyqk : '', 129, 136); | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2024-01-18 10:59:00 | 4 | * @LastEditTime: 2024-01-18 11:04:37 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="text-align: center;"> | 7 | <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="text-align: center;"> |
... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
14 | </el-tabs> | 14 | </el-tabs> |
15 | </div> | 15 | </div> |
16 | <el-empty description="暂无数据" v-if="headTabBdcqz.length == 0 && noData"></el-empty> | 16 | <el-empty description="暂无数据" v-if="headTabBdcqz.length == 0 && noData"></el-empty> |
17 | <div style="max-height:85vh;"> | 17 | <div style="max-height:89vh;"> |
18 | <div v-show="this.bdcqz.bdcqzlx==1"> | 18 | <div v-show="this.bdcqz.bdcqzlx==1"> |
19 | <el-tabs v-model="activeTitle"> | 19 | <el-tabs v-model="activeTitle"> |
20 | <el-tab-pane label="第一页" name="title1"></el-tab-pane> | 20 | <el-tab-pane label="第一页" name="title1"></el-tab-pane> |
... | @@ -198,7 +198,16 @@ | ... | @@ -198,7 +198,16 @@ |
198 | context.fillStyle = '#000000'; | 198 | context.fillStyle = '#000000'; |
199 | context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 60, 56); | 199 | context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 60, 56); |
200 | context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 113, 56); | 200 | context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 113, 56); |
201 | context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 180, 56); | 201 | // context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 180, 56); |
202 | if (getByteLen(this.bdcqz.sxqc) > 14) { | ||
203 | const originalFont = context.font; | ||
204 | // 设置新的字体大小 | ||
205 | context.font = '14px 楷体'; // 替换为你想要的字体和大小 | ||
206 | // 绘制 bdcdyh | ||
207 | context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 165, 56); | ||
208 | // 恢复原始字体设置 | ||
209 | context.font = originalFont; | ||
210 | } | ||
202 | context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 370, 56); | 211 | context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 370, 56); |
203 | context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 129, 97); | 212 | context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 129, 97); |
204 | context.fillText(this.bdcqz.gyqk ? this.bdcqz.gyqk : '', 129, 136); | 213 | context.fillText(this.bdcqz.gyqk ? this.bdcqz.gyqk : '', 129, 136); | ... | ... |
-
Please register or sign in to post a comment