Commit 67ac7f96 by zhuzhequan

添加自动打印逻辑

parent 7daef452
{ {
"apiApiHost":"http://10.168.31.142:8060/api", "apiApiHost":"http://10.168.31.230:8060/api",
"fileApiUrl":"http://10.168.31.142:80/upload/factory", "fileApiUrl":"http://10.168.31.230:80/upload/factory",
"visionUrl":"https://console.jomalls.com" "visionUrl":"https://console.jomalls.com"
} }
...@@ -519,20 +519,21 @@ export default { ...@@ -519,20 +519,21 @@ export default {
}); });
}, },
getComputedName(title) { getComputedName(title) {
let img = this.selectImgList.find((it) => it.title === title); let img = this.selectImgList.find((it) => it.title === title || it.title.includes(title));
return img?.designId; return img?.designId;
}, },
getComputedTitle(title) { getComputedTitle(title) {
console.log(this.selectImgList, "this.selectImgList"); console.log(this.selectImgList, "this.selectImgList");
let img = this.selectImgList.find((it) => it.title === title); let img = this.selectImgList.find((it) => it.title === title || it.title.includes(title));
return img?.productionFile; return img?.productionFile;
}, },
getBackFile({ files, size }, callback) { getBackFile({ files, size }, callback) {
let that = this; let that = this;
let bw = window.getComputedStyle( let bw = document.getElementById("line").clientWidth;
// let bw = window.getComputedStyle(
document.getElementsByClassName("grid")[0] document.getElementsByClassName("grid")[0]
).width; ).width;
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++) {
files[i].url = files[i].productionFile || files[i].url; files[i].url = files[i].productionFile || files[i].url;
that.$nextTick(async () => { that.$nextTick(async () => {
...@@ -922,20 +923,18 @@ export default { ...@@ -922,20 +923,18 @@ export default {
style="margin: 5px;width: auto;" style="margin: 5px;width: auto;"
border border
:data="detail.imageAry" :data="detail.imageAry"
:header-cell-style="{ 'text-align': 'center' }" :header-cell-style="{ 'text-align': 'center' }">
> <el-table-column align="center" label="打印区域"
<el-table-column
label="打印区域"
prop="title" prop="title"
align="center" align="center"
width="100px" width="100px"
></el-table-column> ></el-table-column>
<el-table-column label="效果图" prop="title"> <el-table-column align="center" label="效果图" prop="title">
<template slot-scope="{ row }"> <template slot-scope="{row}">
<img class="full-width" :src="row.url" alt="" /> <img class="full-width" :src="row.url" alt="" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="素材图" prop="title"> <el-table-column align="center" label="素材图" prop="title">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<img <img
style="cursor: pointer" style="cursor: pointer"
......
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