Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportAll">导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-col :span="2" v-if="canExportAll">
|
||||
<el-button type="info" plain icon="el-icon-printer" size="mini" :disabled="multiple" @click="handleBatchPrintLabel">批量打印标签</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
@@ -345,6 +345,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
canExportAll: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -822,8 +826,8 @@ export default {
|
||||
const paperHeightMm = 100;
|
||||
// 留白:左右约 4mm;上下更小一些,避免底部空得太多
|
||||
const marginXmm = 4;
|
||||
const marginTopMm = 2;
|
||||
const marginBottomMm = 1;
|
||||
const marginTopMm = 0;
|
||||
const marginBottomMm = 0;
|
||||
|
||||
const pageWidthPt = paperWidthMm * mmToPt;
|
||||
const pageHeightPt = paperHeightMm * mmToPt;
|
||||
@@ -873,7 +877,9 @@ export default {
|
||||
const x = marginXPt + (contentWidthPt - drawW) / 2;
|
||||
const y = marginBottomPt + (contentHeightPt - drawH) / 2;
|
||||
|
||||
page.drawImage(pngImage, { x, y, width: drawW, height: drawH });
|
||||
console.log(pngImage)
|
||||
|
||||
page.drawImage(pngImage, { x, y: y - 20, width: drawW, height: drawH + 20 });
|
||||
}
|
||||
|
||||
const pdfBytes = await pdfDoc.save();
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
:labelType="labelType"
|
||||
:showStatus="showStatus"
|
||||
:hideType="hideType"
|
||||
:showLength="showLength" />
|
||||
:showLength="showLength"
|
||||
:canExportAll="canExportAll"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -27,6 +29,7 @@ export default {
|
||||
showStatus: true,
|
||||
hideType: true,
|
||||
showLength: true,
|
||||
canExportAll: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user