Commit eb17b0f3 by zhuzhequan

添加自动打印逻辑

parent f345920a
{ {
"apiApiHost":"https://factory.jomalls.com/api",
"apiApiHost":"http://10.168.31.230:8060/api", "fileApiUrl":"https://factory.jomalls.com/upload/factory",
"fileApiUrl":"http://10.168.31.230:80/upload/factory", "visionUrl":"https://console.jomalls.com"
"visionUrl":"https://console.jomalls.com"
} }
...@@ -540,10 +540,8 @@ export default { ...@@ -540,10 +540,8 @@ export default {
}, },
getBackFile({ files, size }, callback) { getBackFile({ files, size }, callback) {
let that = this; let that = this;
let bw = window.getComputedStyle( let bw = document.getElementById('line')
document.getElementsByClassName("grid")[0] bw = bw.clientWidth
).width;
bw = Number(bw.replace("px", ""));
// bw = Number(bw.replace("px", "")); // bw = Number(bw.replace("px", ""));
for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) {
...@@ -1288,7 +1286,7 @@ export default { ...@@ -1288,7 +1286,7 @@ export default {
</div> </div>
<div <div
class="print-tip" class="print-tip"
v-if="detail && detail.designImageSize && selectImgList.length" v-if="detail && detail.mssWidth && detail.mssHeight && selectImgList.length"
> >
<b style="color: green" v-if="hasSize" <b style="color: green" v-if="hasSize"
>该生产单无需拖动设计,直接打印</b >该生产单无需拖动设计,直接打印</b
...@@ -1323,9 +1321,9 @@ export default { ...@@ -1323,9 +1321,9 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.print-tip { .print-tip {
position: absolute; position: absolute;
bottom: 130px; bottom: 16px;
font-size: 24px; font-size: 24px;
left: 35%; left: 20%;
} }
.page-main { .page-main {
display: flex; display: flex;
......
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