Commit 2291a606 by zhuzhequan

添加自动打印逻辑

parent 37efd092
......@@ -263,7 +263,7 @@ export default {
bus.$emit("busEmit", {
type: "sendFile",
value: res.data,
// size: { width: this.detail.mssWidth || 500, height: this.detail.mssHeight || 500 },
size: { width: this.detail.mssWidth || 500, height: this.detail.mssHeight || 500 },
});
}
......
......@@ -87,6 +87,7 @@ export default {
actionList: [],
checkList: [],
oldImgList: [],
hasSize:false,
parentWidth: 0,
systemSetting: {},
imgHeight: 0,
......@@ -672,6 +673,11 @@ export default {
});
break;
case "sendFile":
if(size.width && size.height) {
this.hasSize = true
}else{
this.hasSize = false
}
this.imgList = [];
this.selectIndex = -1;
if (value.length > 0) {
......@@ -779,6 +785,10 @@ export default {
</div>
</div>
<img class="template-img" draggable="false" :src="img" alt="" />
<div class="print-tip" v-if="imgList.length">
<b style="color: green" v-if="hasSize ">该生产单无需拖动设计,直接打印</b>
<b style="color: red" v-else>该生产单需要拖动设计打印</b>
</div>
</div>
<print-dialog
......@@ -793,6 +803,7 @@ export default {
"
></i>
</print-dialog>
</div>
</div>
<img-setting
......@@ -840,6 +851,12 @@ export default {
</template>
<style lang="less" scoped>
.print-tip{
position: absolute;
bottom: 130px;
font-size: 24px;
left: 35%;
}
.page-main {
flex: 1;
flex-shrink: 0;
......@@ -923,6 +940,7 @@ export default {
justify-content: center;
align-items: center;
position: relative;
}
.sucaitu {
......@@ -961,6 +979,7 @@ export default {
height: 100%;
cursor: move;
border: 1px dashed transparent;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment