Commit e774c720 by linjinhong

新增下载原素材按钮以及完成上一单提示

parent 97e0fb09
{
"apiApiHost":"http://10.168.31.142:8060/api",
"fileApiUrl":"http://10.168.31.142:80/upload/factory",
"apiApiHost":"https://factory.jomalls.com/api",
"fileApiUrl":"https://factory.jomalls.com/upload/factory",
"visionUrl":"https://console.jomalls.com"
}
......@@ -813,6 +813,33 @@ export default {
}
this.$store.commit("setIsPreView", this.isView);
},
async downloadImg() {
let res = await this.$api.post("/downloadBySubOrderNumber", [
this.detail.id,
this.$store.state.desktopDevice,
]);
if (res.data.length === 0) return this.$message.warning("未找到素材图!");
let imgList = [];
res.data.forEach((el) => {
imgList = imgList.concat(el.list || []);
});
let arr = [];
res.data.forEach((el) => {
if (el.list) {
el.list.forEach((it) => {
arr.push(it);
});
}
});
res.data = arr.filter((el) => el.type !== 1);
this.selectImgList = [...res.data];
console.log(823, this.selectImgList);
this.imgList = [];
this.selectIndex = -1;
this.selectImgIndex = 0;
this.getBackFile({ files: [this.selectImgList[0]] });
},
},
mounted() {
this.imgHeight = window.screen.height + "px";
......@@ -1025,14 +1052,24 @@ export default {
</PicScrollbarBox>
<PicScrollbarBox boxTitle="素材图" emptyTitle="素材图为空">
<template #titleRight>
<div>
<el-button
type="primary"
size="small"
v-if="selectImgList.length"
style="margin: 10px;"
style="margin: 5px;"
@click="downloadImg"
>下载原素材</el-button
>
<el-button
type="primary"
size="small"
v-if="selectImgList.length"
style="margin: 5px;"
@click="cutImgFn"
>裁切</el-button
>
</div>
</template>
<template #mainContent>
<div
......
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