From d96ac2eaf4129698c49d31050009b524c7a0e38d Mon Sep 17 00:00:00 2001
From: 王恒 <318726284@qq.com>
Date: 星期五, 29 八月 2025 19:20:21 +0800
Subject: [PATCH] '新增综合查一次'
---
src/views/infomanger/companymanger/components/createQrcode.vue | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/views/infomanger/companymanger/components/createQrcode.vue b/src/views/infomanger/companymanger/components/createQrcode.vue
index d567ff7..cc08bd0 100644
--- a/src/views/infomanger/companymanger/components/createQrcode.vue
+++ b/src/views/infomanger/companymanger/components/createQrcode.vue
@@ -2,12 +2,13 @@
<el-dialog title="浜岀淮鐮�" v-model="dialogVisible" width="300px" @close="closeDialog">
<div class="text-center">
<vueQr ref="query" background="#fff" :text="info.companyCode"></vueQr>
+ <div style="font-weight: bold;margin-bottom: 10px;">瀵熷幙鎵爜鍏ヤ紒鐩戠潱骞冲彴</div>
<div>{{ info.companyName }}</div>
<div style="margin-top: 10px;">
<el-link @click="downImage" type="primary">涓嬭浇浼佷笟鐮�</el-link>
</div>
</div>
- <canvas ref="canvasRef" style="position: absolute; left: 0; top: 2210px;background-color: white;"></canvas>
+ <canvas ref="canvasRef" style="position: absolute; left: 0; top: 2210px;background-color: white; display: none;"></canvas>
</el-dialog>
</template>
@@ -41,9 +42,9 @@
function drawText() {
const canvas = canvasRef.value;
canvas.width = 350;
- canvas.height = 350;
+ canvas.height = 380;
canvas.style.width = '350px';
- canvas.style.height = '350px';
+ canvas.style.height = '380px';
const ctx = canvas.getContext('2d');
ctx.fillStyle = "#fff"
ctx.fillRect(0, 0, canvas.width, canvas.height);
@@ -52,10 +53,15 @@
const text = info.value.companyName;
ctx.drawImage(img, 10, 0, 320, 320);
- ctx.font = '20px Arial';
+ // ctx.font = '20px Arial';
ctx.textAlign = 'center';
ctx.fillStyle = '#000';
- wrapText(ctx, text, 180, 320, 350, 20)
+ // ctx.setFontWeight('bold')
+ ctx.font ='bold 20px Arial'
+ wrapText(ctx, "瀵熷幙鎵爜鍏ヤ紒鐩戠潱骞冲彴", 180, 320, 350, 40)
+ // ctx.setFontWeight('normal')
+ ctx.font ="20px Arial"
+ wrapText(ctx, text, 180, 350, 350, 20)
}
function wrapText(context, text, x, y, maxWidth, lineHeight) {
var words = text.split('');
@@ -92,4 +98,7 @@
openDialog,
closeDialog
})
-</script>
\ No newline at end of file
+</script>
+
+<style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.1