|
|
@ -123,11 +123,12 @@
|
|
|
|
@pagination="getList"
|
|
|
|
@pagination="getList"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :title="printTitle" :visible.sync="printOpen" width="500px" append-to-body>
|
|
|
|
<el-dialog :title="printTitle" :visible.sync="printOpen" width="1000px" append-to-body>
|
|
|
|
<div class="center-content" id="printFrom" style="display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; margin: 0 auto;">
|
|
|
|
<div id="printFrom" style="display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; margin: 0 auto;">
|
|
|
|
<canvas ref="qrCanvas" width="200" height="200" style="width: 200px; height: 200px;"></canvas>
|
|
|
|
<canvas ref="qrCanvas" width="1000" height="1000" style="width: 200px; height: 200px;"></canvas>
|
|
|
|
<ul class="no-bullets"style="list-style-type: none; padding: 0;">
|
|
|
|
<ul class="no-bullets"style="list-style-type: none; padding: 0;">
|
|
|
|
<li class="material-info" style="font-size: 24px;">库区:{{printData.areaCode}}</li>
|
|
|
|
<li class="material-info" style="font-size: 50px;">库区</li>
|
|
|
|
|
|
|
|
<li class="material-info" style="font-size: 50px;">{{printData.areaCode}}</li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@ -371,9 +372,11 @@ export default {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
const canvas = this.$refs.qrCanvas;
|
|
|
|
const canvas = this.$refs.qrCanvas;
|
|
|
|
const options = {
|
|
|
|
const options = {
|
|
|
|
width: 200, // 设定二维码的宽度
|
|
|
|
width: 1000, // 设定二维码的宽度
|
|
|
|
height: 200 // 设定二维码的高度
|
|
|
|
height: 1000 // 设定二维码的高度
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
// 计算居中位置
|
|
|
|
|
|
|
|
|
|
|
|
QRCode.toCanvas(canvas,row.areaCode, options, error => {
|
|
|
|
QRCode.toCanvas(canvas,row.areaCode, options, error => {
|
|
|
|
if (error) console.error(error);
|
|
|
|
if (error) console.error(error);
|
|
|
|
});
|
|
|
|
});
|
|
|
|