Commit a6c2149b by linjinhong

fix:修改裁切问题

parent 4db41e14
......@@ -158,7 +158,11 @@ async function processImages(inputPath, outputPath, options = {}) {
results = await cropTransparentEdges(inputPath, outputPath, options);
} else {
// 处理单个图片
const result = await cropImage(inputPath, outputPath, options);
const result = await cropImageTransparentEdges(
inputPath,
outputPath,
options
);
results = [{ file: path.basename(inputPath), ...result }];
}
......
......@@ -464,7 +464,10 @@ export default {
const pscPart = parts.find((part) => part.includes("PSC"));
if (pscPart) {
this.$store.commit("setOrderType", this.classifyField(this.productionNo));
this.$store.commit(
"setOrderType",
this.classifyField(this.productionNo)
);
} else {
this.$store.commit(
"setOrderType",
......@@ -472,7 +475,12 @@ export default {
);
}
} else {
const str = this.productionNo.split("PSC")[0];
let str;
if (this.productionNo.includes("PSC")) {
str = this.productionNo.split("PSC")[0];
} else {
str = "GC";
}
this.$store.commit("setOrderType", str);
}
......@@ -480,7 +488,7 @@ export default {
console.log(423, this.productionNo);
try {
//查找生产单号信息传给第二个显示器
//查找生产单号信息
const findByPodProductionNo = await this.$api.post(
"/findByPodProductionNo",
{
......
......@@ -1201,7 +1201,6 @@ export default {
v-for="(img, index) in detail.imageAry"
:key="index"
class="img-item"
style="width: 50%;"
>
<img :src="img.url" />
<div v-if="img.title && img.title.length < 2" class="imgTitle">
......@@ -1245,7 +1244,6 @@ export default {
v-for="(img, i) in selectImgList"
:key="i"
class="img-item"
style="width: 50%;"
@click.stop.prevent="selectImg(img, i)"
>
<img v-if="img.productionFile" :src="img.productionFile" />
......@@ -1909,12 +1907,15 @@ img {
font-size: 20px;
}
.boxImg {
width: 100%;
display: flex;
padding: 5px;
box-sizing: border-box;
overflow-x: auto;
.img-item {
flex: 50%;
position: relative;
overflow: hidden;
// overflow: hidden;
padding: 5px;
box-sizing: border-box;
background: #ececec;
......@@ -1923,14 +1924,15 @@ img {
box-sizing: border-box;
text-align: center;
line-height: 1;
&:first-child {
margin-right: 5px;
}
// &:first-child {
// margin-right: 5px;
// }
img {
width: auto;
height: auto;
max-height: 190px;
max-width: 220px;
}
.imgTitle {
......@@ -1949,6 +1951,9 @@ img {
}
}
}
.boxImg > * {
margin: 5px;
}
.effectPic {
.img {
width: 100%;
......
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