Commit a6c2149b by linjinhong

fix:修改裁切问题

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