Merge branch 'StableVersion' of https://e.coding.net/aidlabfashion/aida/aida_front into StableVersion

This commit is contained in:
X1627315083
2024-09-25 15:16:08 +08:00
12 changed files with 185 additions and 153 deletions

View File

@@ -123,7 +123,7 @@
<div class="clothes_detail_item clothes_detail_item_elements" :class="[current?.id?'':'hideCursor']"> <div class="clothes_detail_item clothes_detail_item_elements" :class="[current?.id?'':'hideCursor']">
<div class="clothes_item_header"> <div class="clothes_item_header">
<i class="fi fi-rs-comments"></i> <i class="fi fi-rs-comments"></i>
<div>Current Elements</div> <div>{{ $t('DesignDetail.CurrentElements') }}</div>
<i class="fi fi-rr-edit" @click.stop="openCurrent(4)"></i> <i class="fi fi-rr-edit" @click.stop="openCurrent(4)"></i>
</div> </div>
<div class="Guide_1_20 clothes_item_icon" :class="[driver__.driver?'showEvents':'']"> <div class="Guide_1_20 clothes_item_icon" :class="[driver__.driver?'showEvents':'']">

View File

@@ -589,8 +589,8 @@ export default defineComponent({
this.upload.level1Type = 'Sketchboard' this.upload.level1Type = 'Sketchboard'
this.uploadList = this.apparelList this.uploadList = this.apparelList
this.designTypeList = this.sketchCatecoryList this.designTypeList = this.sketchCatecoryList
this.designType = this.current.type // this.designType = this.current.type
// this.designType = this.designTypeList[0].value this.designType = this.designTypeList[0].value
}else if (num == 2){ }else if (num == 2){
this.selectCode = 'Printboard' this.selectCode = 'Printboard'
this.upload.level1Type = 'Printboard' this.upload.level1Type = 'Printboard'

View File

@@ -277,8 +277,6 @@ export default defineComponent({
location:[0,0] location:[0,0]
}) })
this.refetchTemplate(currentIndex) this.refetchTemplate(currentIndex)
}, },
//设置移动 //设置移动
itemMoveMousedown(index,event){ itemMoveMousedown(index,event){
@@ -378,7 +376,6 @@ export default defineComponent({
//判断尺寸是否到边 //判断尺寸是否到边
this.printStyleList[this.imgDomIndex].style.width = width this.printStyleList[this.imgDomIndex].style.width = width
this.printStyleList[this.imgDomIndex].style.height = height this.printStyleList[this.imgDomIndex].style.height = height
}, },
//鼠标抬起 //鼠标抬起
sizeMouseup(e){ sizeMouseup(e){
@@ -441,38 +438,44 @@ export default defineComponent({
await this.setPrintWH(item.path) await this.setPrintWH(item.path)
this.designSelectElementsList this.designSelectElementsList
let sketch = document.getElementsByClassName("designElements_modal")[0]?.getElementsByClassName('designElements_sketch')[0] let sketch = document.getElementsByClassName("designElements_modal")[0]?.getElementsByClassName('designElements_sketch')[0]
let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth let sketchImg = new Image()
let scale sketchImg.onload = ()=>{
scale = (this.print.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,'')) let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
let zIndex = 1 let scale
let left = item.location[0]/sketchNum+'px' scale = (this.print.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
let top = item.location[1]/sketchNum+'px' let zIndex = 1
if(sketch.offsetWidth < item.location[0]/sketchNum){ let left = item.location[0]/sketchNum+'px'
left = sketch.offsetWidth +'px' let top = item.location[1]/sketchNum+'px'
} if(sketch.offsetWidth < item.location[0]/sketchNum){
if(sketch.offsetHeight < item.location[1]/sketchNum){ left = sketch.offsetWidth +'px'
top = sketch.offsetHeight +'px' }
} if(sketch.offsetHeight < item.location[1]/sketchNum){
this.printStyleList[index]={ top = sketch.offsetHeight +'px'
centers:{ }
left:0, this.printStyleList[index]={
top:0, centers:{
}, left:0,
style:{ top:0,
left:left, },
top:top, style:{
right:"auto", left:left,
bottom:"auto", top:top,
width:this.print.width.replace(/px/g,'')/sketchNum*item.scale+'px', right:"auto",
height:this.print.height.replace(/px/g,'')/sketchNum*item.scale+'px', bottom:"auto",
zIndex:zIndex++ width:this.print.width.replace(/px/g,'')/sketchNum*item.scale+'px',
}, height:this.print.height.replace(/px/g,'')/sketchNum*item.scale+'px',
transform:{ zIndex:zIndex++
// scale:scale<.2?.2:scale,//0.2-3 },
rotateZ:item.angle, transform:{
}, // scale:scale<.2?.2:scale,//0.2-3
designElementsBtn:false rotateZ:item.angle,
},
designElementsBtn:false
}
sketchImg.remove()
} }
sketchImg.src = sketch.src
}, },
computeZindex(resolve,prints){ computeZindex(resolve,prints){
prints.sort((a, b) => { prints.sort((a, b) => {

View File

@@ -43,7 +43,7 @@
v-for="item,index in exhibitionElementsList" v-for="item,index in exhibitionElementsList"
:key="item" :key="item"
:style="[printStyleList?.[index]?.style]" :style="[printStyleList?.[index]?.style]"
@touchstart.stop="itemMoveMousedown(index,$event)" @touchstart.passive="itemMoveMousedown(index,$event)"
class="modal_imgItem" class="modal_imgItem"
ref="content" > ref="content" >
<img crossOrigin="anonymous" :src="item?.path" :style="{transform:`rotateZ(${printStyleList[index]?.transform?.rotateZ}deg)`}" class="designElementsMobile_imgItme" draggable="false"> <img crossOrigin="anonymous" :src="item?.path" :style="{transform:`rotateZ(${printStyleList[index]?.transform?.rotateZ}deg)`}" class="designElementsMobile_imgItme" draggable="false">
@@ -52,7 +52,7 @@
<!-- <img :src="current?.path" alt="" class="designElementsMobile_sketch"> --> <!-- <img :src="current?.path" alt="" class="designElementsMobile_sketch"> -->
<img :src="current?.undividedLayer?current.undividedLayer:current.path" alt="" class="designElementsMobile_sketch"> <img :src="current?.undividedLayer?current.undividedLayer:current.path" alt="" class="designElementsMobile_sketch">
<div class="designElementsMobile_btn"> <div class="designElementsMobile_btn">
<ul v-for="item,index in printStyleList" :key="item" :class="{active:item?.designElementsBtn?item?.designElementsBtn:false}" class="designElementsMobile_Mousingle" :style="item.style" @touchstart.stop="itemMoveMousedown(index,$event)"> <ul v-for="item,index in printStyleList" :key="item" :class="{active:item?.designElementsBtn?item?.designElementsBtn:false}" class="designElementsMobile_Mousingle" :style="item?.style" @touchstart.stop="itemMoveMousedown(index,$event)">
<li class="designElementsMobile_btn_top" @touchstart.stop="itemSizeMousedown('top',$event)"></li> <li class="designElementsMobile_btn_top" @touchstart.stop="itemSizeMousedown('top',$event)"></li>
<li class="designElementsMobile_btn_bottom" @touchstart.stop="itemSizeMousedown('bottom',$event)"></li> <li class="designElementsMobile_btn_bottom" @touchstart.stop="itemSizeMousedown('bottom',$event)"></li>
<li class="designElementsMobile_btn_left" @touchstart.stop="itemSizeMousedown('left',$event)"></li> <li class="designElementsMobile_btn_left" @touchstart.stop="itemSizeMousedown('left',$event)"></li>
@@ -305,12 +305,12 @@ export default defineComponent({
itemSizeMousedown(direction,event){ itemSizeMousedown(direction,event){
this.direction = direction this.direction = direction
this.imgDom = document.getElementsByClassName('designElementsMobile_modal')[0].getElementsByClassName("modal_imgItem")[this.imgDomIndex] this.imgDom = document.getElementsByClassName('designElementsMobile_modal')[0].getElementsByClassName("modal_imgItem")[this.imgDomIndex]
let scale = Number(this.imgDom.style.transform?.split('scale(')[1]?.split(')')[0]) let scale = Number(this.imgDom.children[0].style.transform?.split('scale(')[1]?.split(')')[0])
let rotateZ = Number(this.imgDom.style.transform?.split('rotateZ(')[1]?.split('deg')[0]) let rotateZ = Number(this.imgDom.children[0].style.transform?.split('rotateZ(')[1]?.split('deg')[0])
this.printStyleList[this.imgDomIndex].designElementsBtn = true this.printStyleList[this.imgDomIndex].designElementsBtn = true
this.printStyleList[this.imgDomIndex].transform = { this.printStyleList[this.imgDomIndex].transform = {
scale:scale, scale:scale,
rotateZ:rotateZ, rotateZ:rotateZ?rotateZ:0,
} }
let imgDomWH = this.imgDom.getBoundingClientRect() let imgDomWH = this.imgDom.getBoundingClientRect()
let li = document.getElementsByClassName('designElementsMobile_modal')[0].getElementsByClassName("designElementsMobile_btn_top")[0].offsetWidth/2 let li = document.getElementsByClassName('designElementsMobile_modal')[0].getElementsByClassName("designElementsMobile_btn_top")[0].offsetWidth/2
@@ -393,13 +393,9 @@ export default defineComponent({
document.removeEventListener("touchmove", this.sizeMousemove); document.removeEventListener("touchmove", this.sizeMousemove);
}, },
touchend(e) { touchend(e) {
document.removeEventListener("touchend", this.touchend); document.removeEventListener("touchend", this.touchend);
document.removeEventListener("touchmove", this.moveMousemove); document.removeEventListener("touchmove", this.moveMousemove);
}, },
deletePrint(){ deletePrint(){
this.exhibitionElementsList.splice(this.imgDomIndex,1) this.exhibitionElementsList.splice(this.imgDomIndex,1)
this.printStyleList.splice(this.imgDomIndex,1) this.printStyleList.splice(this.imgDomIndex,1)
@@ -442,38 +438,46 @@ export default defineComponent({
await this.setPrintWH(item.path) await this.setPrintWH(item.path)
this.designElementsList this.designElementsList
let sketch = document.getElementsByClassName("designElementsMobile_modal")[0]?.getElementsByClassName('designElementsMobile_sketch')[0] let sketch = document.getElementsByClassName("designElementsMobile_modal")[0]?.getElementsByClassName('designElementsMobile_sketch')[0]
let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth let sketchImg = new Image()
let scale sketchImg.onload = ()=>{
scale = (this.print.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,'')) let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
let zIndex = 1 let scale
let left = item.location[0]/sketchNum+'px' scale = (this.print.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
let top = item.location[1]/sketchNum+'px' let zIndex = 1
if(sketch.offsetWidth < item.location[0]/sketchNum){ let left = item.location[0]/sketchNum+'px'
left = sketch.offsetWidth +'px' let top = item.location[1]/sketchNum+'px'
} if(sketch.offsetWidth < item.location[0]/sketchNum){
if(sketch.offsetHeight < item.location[1]/sketchNum){ left = sketch.offsetWidth +'px'
top = sketch.offsetHeight +'px' }
} if(sketch.offsetHeight < item.location[1]/sketchNum){
this.printStyleList[index]={ top = sketch.offsetHeight +'px'
centers:{ }
left:0, console.log(sketch.offsetWidth,this.sketch.width.replace(/rem/g,''));
top:0,
}, this.printStyleList[index]={
style:{ centers:{
left:left, left:0,
top:top, top:0,
right:"auto", },
bottom:"auto", style:{
width:this.print.width.replace(/px/g,'')/sketchNum*item.scale+'px', left:left,
height:this.print.height.replace(/px/g,'')/sketchNum*item.scale+'px', top:top,
zIndex:zIndex++ right:"auto",
}, bottom:"auto",
transform:{ width:this.print.width.replace(/px/g,'')/sketchNum*item.scale+'px',
// scale:scale<.2?.2:scale,//0.2-3 height:this.print.height.replace(/px/g,'')/sketchNum*item.scale+'px',
rotateZ:item.angle, zIndex:zIndex++
}, },
designElementsBtn:false transform:{
// scale:scale<.2?.2:scale,//0.2-3
rotateZ:item.angle,
},
designElementsBtn:false
}
sketchImg.remove()
} }
sketchImg.src = sketch.src
}, },
computeZindex(resolve,prints){ computeZindex(resolve,prints){
prints.sort((a, b) => { prints.sort((a, b) => {
@@ -523,9 +527,6 @@ export default defineComponent({
index = ind index = ind
} }
}) })
let priority = designItemDetail.clothes.map((v)=>{
return v.type
})
// let data = { // let data = {
// ...designItemDetail, // ...designItemDetail,
// priority:priority, // priority:priority,

View File

@@ -474,7 +474,7 @@ export default defineComponent({
this.printStyleList[this.stateOverallSingle][this.imgDomIndex].designOpenrtionBtn = true this.printStyleList[this.stateOverallSingle][this.imgDomIndex].designOpenrtionBtn = true
this.printStyleList[this.stateOverallSingle][this.imgDomIndex].transform = { this.printStyleList[this.stateOverallSingle][this.imgDomIndex].transform = {
scale:scale, scale:scale,
rotateZ:rotateZ, rotateZ:rotateZ?rotateZ:0,
} }
let imgDomWH = this.imgDom.getBoundingClientRect() let imgDomWH = this.imgDom.getBoundingClientRect()
let li = document.getElementsByClassName('designOpenrtion_modal')[0].getElementsByClassName("designOpenrtion_btn_top")[0].offsetWidth/2 let li = document.getElementsByClassName('designOpenrtion_modal')[0].getElementsByClassName("designOpenrtion_btn_top")[0].offsetWidth/2

View File

@@ -467,12 +467,12 @@ export default defineComponent({
itemSizeMousedown(direction,event){ itemSizeMousedown(direction,event){
this.direction = direction this.direction = direction
this.imgDom = document.getElementsByClassName('designOpenrtionMobile_modal')[0].getElementsByClassName("modal_imgItem")[this.imgDomIndex] this.imgDom = document.getElementsByClassName('designOpenrtionMobile_modal')[0].getElementsByClassName("modal_imgItem")[this.imgDomIndex]
let scale = Number(this.imgDom.style.transform?.split('scale(')[1]?.split(')')[0]) let scale = Number(this.imgDom.children[0].style.transform?.split('scale(')[1]?.split(')')[0])
let rotateZ = Number(this.imgDom.style.transform?.split('rotateZ(')[1]?.split('deg')[0]) let rotateZ = Number(this.imgDom.children[0].style.transform?.split('rotateZ(')[1]?.split('deg')[0])
this.printStyleList[this.stateOverallSingle][this.imgDomIndex].designOpenrtionBtn = true this.printStyleList[this.stateOverallSingle][this.imgDomIndex].designOpenrtionBtn = true
this.printStyleList[this.stateOverallSingle][this.imgDomIndex].transform = { this.printStyleList[this.stateOverallSingle][this.imgDomIndex].transform = {
scale:scale, scale:scale,
rotateZ:rotateZ, rotateZ:rotateZ?rotateZ:0,
} }
let imgDomWH = this.imgDom.getBoundingClientRect() let imgDomWH = this.imgDom.getBoundingClientRect()
let li = document.getElementsByClassName('designOpenrtionMobile_modal')[0].getElementsByClassName("designOpenrtionMobile_btn_top")[0].offsetWidth/2 let li = document.getElementsByClassName('designOpenrtionMobile_modal')[0].getElementsByClassName("designOpenrtionMobile_btn_top")[0].offsetWidth/2

View File

@@ -277,7 +277,6 @@
<div>all</div> <div>all</div>
</div> </div>
</div> </div>
<div class="SRExport_img"> <div class="SRExport_img">
<div class="SRExport_img_item_box" v-for="item in allExportSR" @click="selectImg(item)"> <div class="SRExport_img_item_box" v-for="item in allExportSR" @click="selectImg(item)">
<input type="checkbox" v-model="item.checked"> <input type="checkbox" v-model="item.checked">
@@ -310,6 +309,7 @@ import { exportSele,JSRectUpdata,JSchangeType,JScanvasMouseDown,JScanvasMouseMov
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import {isMoible,calculateGradientCoordinate,base64ToFile} from '@/tool/util' import {isMoible,calculateGradientCoordinate,base64ToFile} from '@/tool/util'
import publish from "@/component/WorksPage/publish.vue"; import publish from "@/component/WorksPage/publish.vue";
import { connect } from "echarts";
export default defineComponent({ export default defineComponent({
components: { components: {
@@ -326,7 +326,7 @@ export default defineComponent({
}) })
let showUpgradePlan = ref(false); let showUpgradePlan = ref(false);
let canvas = reactive({}); let canvas = ref({});
// let canvasDom = ref() // let canvasDom = ref()
let canvasWH = ref({ let canvasWH = ref({
width: 400, width: 400,
@@ -363,11 +363,11 @@ export default defineComponent({
let isLoadCanvas = false//撤回或者反撤回false为撤回 let isLoadCanvas = false//撤回或者反撤回false为撤回
let userlikeGroupId = 0 let userlikeGroupId = 0
let init = (productData) => { let init = (productData) => {
showUpgradePlan.value = true;
userlikeGroupId = productData.userlikeGroupId userlikeGroupId = productData.userlikeGroupId
canvasWH.value.height = 100 canvasWH.value.height = 100
normalCanvasState.value = [] normalCanvasState.value = []
reverseCanvasState.value = [] reverseCanvasState.value = []
showUpgradePlan.value = true;
allBoardData.value.likeDesignCollectionList = allBoardData.value.likeDesignCollectionList =
likeDesignCollectionList; likeDesignCollectionList;
allBoardData.value[productData.key] = productData.imgList; allBoardData.value[productData.key] = productData.imgList;
@@ -470,6 +470,7 @@ export default defineComponent({
//循环渲染顺序 //循环渲染顺序
let imgWidth = setImageWidth(key); //这是设置画布等宽 let imgWidth = setImageWidth(key); //这是设置画布等宽
// alert(imgWidth)
let sketchGroupingItem = []; let sketchGroupingItem = [];
if ( if (
item == "moodboardFiles" && item == "moodboardFiles" &&
@@ -501,62 +502,66 @@ export default defineComponent({
allItem.designOutfitUrl; allItem.designOutfitUrl;
} }
fabric.Image.fromURL(itemCanvasImg,(img) => { fabric.Image.fromURL(itemCanvasImg,(img) => {
let scaleWH = imgWidth / img.width; //计算放到画布上缩小倍率 img.on('added', () => {
if(key == "sketchboardFiles"){ img.set({ crossOrigin: 'anonymous' });
if(allItemIndex == 0){ let scaleWH = imgWidth / img.width; //计算放到画布上缩小倍率
position.x = 0; if(key == "sketchboardFiles"){
position.y = maxHeight; if(allItemIndex == 0){
} position.x = 0;
}else{ position.y = maxHeight;
if (position.x + img.width * scaleWH > canvasWH.value.width || oldKey != key) { }
position.x = 0; }else{
position.y = maxHeight; if (position.x + img.width * scaleWH > canvasWH.value.width || oldKey != key) {
} position.x = 0;
} position.y = maxHeight;
setCanvasImage(img,key,position.x,position.y,allItem)//设置图片
position.height = img.height * scaleWH + margin;
if (key == "sketchboardFiles") {
if (sketchGroupingItem.length <3) {
sketchGroupingItem.push(JSON.parse(JSON.stringify(position)));
}
if (sketchGroupingItem.length >2) {
let sketchXyIndex = {
maxIndex: 0,
maxNum: 0,
minNum: 999999,
minIndex: 0,
};
sketchGroupingItem.forEach(
(sketchItem,sketchIndex) => {
if (sketchItem.y + sketchItem.height < sketchXyIndex.minNum) {
sketchXyIndex.minNum = sketchItem.y + sketchItem.height
sketchXyIndex.minIndex = sketchIndex;
}
if (sketchItem.y + sketchItem.height > sketchXyIndex.maxNum) {
sketchXyIndex.maxNum = sketchItem.y + sketchItem.height
sketchXyIndex.maxIndex = sketchIndex;
}
}
);
sketchGroupingItem[sketchXyIndex.minIndex].y = sketchXyIndex.minNum
// sketchGroupingItem[sketchXyIndex.maxIndex].y = sketchXyIndex.maxNum
if (allBoardData.value[key].length == allItemIndex + 1) {
maxHeight = sketchXyIndex.maxNum
} else {
position = sketchGroupingItem[sketchXyIndex.minIndex];
} }
} }
} setCanvasImage(img,key,position.x,position.y,allItem)//设置图片
if(key == "sketchboardFiles" && sketchGroupingItem.length >2){ position.height = img.height * scaleWH + margin;
}else{ if (key == "sketchboardFiles") {
position.x += img.width * scaleWH + margin; if (sketchGroupingItem.length <3) {
} sketchGroupingItem.push(JSON.parse(JSON.stringify(position)));
img.lock_rotation = true; }
canvas.add(img); if (sketchGroupingItem.length >2) {
oldKey = key; let sketchXyIndex = {
// setTimeout(() => { maxIndex: 0,
maxNum: 0,
minNum: 999999,
minIndex: 0,
};
sketchGroupingItem.forEach(
(sketchItem,sketchIndex) => {
if (sketchItem.y + sketchItem.height < sketchXyIndex.minNum) {
sketchXyIndex.minNum = sketchItem.y + sketchItem.height
sketchXyIndex.minIndex = sketchIndex;
}
if (sketchItem.y + sketchItem.height > sketchXyIndex.maxNum) {
sketchXyIndex.maxNum = sketchItem.y + sketchItem.height
sketchXyIndex.maxIndex = sketchIndex;
}
}
);
sketchGroupingItem[sketchXyIndex.minIndex].y = sketchXyIndex.minNum
// sketchGroupingItem[sketchXyIndex.maxIndex].y = sketchXyIndex.maxNum
if (allBoardData.value[key].length == allItemIndex + 1) {
maxHeight = sketchXyIndex.maxNum
} else {
position = sketchGroupingItem[sketchXyIndex.minIndex];
}
}
}
if(key == "sketchboardFiles" && sketchGroupingItem.length >2){
}else{
position.x += img.width * scaleWH + margin;
}
let str = `${img.width} + ${scaleWH}`
img.lock_rotation = true;
oldKey = key;
resolve() resolve()
// }, 1000); })
canvas.add(img);
},{ crossOrigin: "Anonymous" }); },{ crossOrigin: "Anonymous" });
} }
}); });
@@ -793,6 +798,7 @@ export default defineComponent({
let xmlhttp = new XMLHttpRequest(); let xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", url, true); xmlhttp.open("GET", url, true);
xmlhttp.responseType = "blob"; xmlhttp.responseType = "blob";
xmlhttp.withCredentials = false;
xmlhttp.onload = function () { xmlhttp.onload = function () {
if (this.status == 200) { if (this.status == 200) {
resolve(this.response); resolve(this.response);
@@ -812,15 +818,27 @@ export default defineComponent({
// 下载文件, 并存成ArrayBuffer对象(blob) // 下载文件, 并存成ArrayBuffer对象(blob)
zip.file(item.name, data, { binary: true }); // 逐个添加文件 zip.file(item.name, data, { binary: true }); // 逐个添加文件
cache[item.title] = data; cache[item.title] = data;
}); })
promises.push(promise); promises.push(promise);
} }
Promise.all(promises) Promise.all(promises)
.then(() => { .then(() => {
function downloadBlob(blob, filename) {
const link = document.createElement('a');
const url = URL.createObjectURL(blob);
link.href = url;
link.download = filename;
document.body.appendChild(link);
link.click();
URL.revokeObjectURL(url);
document.body.removeChild(link);
}
zip.generateAsync({ type: "blob" }).then((content) => { zip.generateAsync({ type: "blob" }).then((content) => {
// 生成二进制流 // 生成二进制流
FileSaver.saveAs(content, "DesignFiles"); // 利用file-saver保存文件 自定义文件名 downloadBlob(content,'DesignFiles')
// FileSaver.saveAs(content, "DesignFiles"); // 利用file-saver保存文件 自定义文件名
isShowMark.value = false; isShowMark.value = false;
}); });
setSubmit()//导出的时候保存 setSubmit()//导出的时候保存
initAligningGuidelines(canvas,true) initAligningGuidelines(canvas,true)

View File

@@ -235,13 +235,13 @@ export default defineComponent({
let arr:any = [] let arr:any = []
rv.forEach((item:any) => { rv.forEach((item:any) => {
arr.push({ arr.push({
name:item.name, name:item.value,
value:item.value, value:item.name,
}) })
}); });
this.designType = rv[0] this.designType = arr[0]
this.editDesignType = rv[0] this.editDesignType = arr[0]
this.disignTypeList = rv this.disignTypeList = arr
// this.workspaceItem.position = this.singleTypeList[0].label // this.workspaceItem.position = this.singleTypeList[0].label
} }
}) })

View File

@@ -450,6 +450,7 @@ export default {
editSketchTitle:'修改草图', editSketchTitle:'修改草图',
CurrentPrint:'当前印花', CurrentPrint:'当前印花',
CurrentColor:'当前颜色', CurrentColor:'当前颜色',
CurrentElements:'当前元素',
}, },
DesignDetailAlter:{ DesignDetailAlter:{
Upload:'上传', Upload:'上传',

View File

@@ -451,6 +451,7 @@ export default {
editSketchTitle:'Modify sketch', editSketchTitle:'Modify sketch',
CurrentPrint:'Current Print', CurrentPrint:'Current Print',
CurrentColor:'Current Color', CurrentColor:'Current Color',
CurrentElements:'Current Elements',
}, },
DesignDetailAlter:{ DesignDetailAlter:{
Upload:'Upload', Upload:'Upload',

View File

@@ -103,7 +103,7 @@ const userHabit : Module<UserHabit,RootState> = {
}); });
}) })
}, },
getLangType(context){ async getLangType(context){
let allPromise = []; let allPromise = [];
let getList = ['DesignElementsEnum','PrintboardLevel2TypeEnum','FemalePosition','MalePosition'] let getList = ['DesignElementsEnum','PrintboardLevel2TypeEnum','FemalePosition','MalePosition']
let axiosGet = (item:any)=>{ let axiosGet = (item:any)=>{
@@ -130,7 +130,7 @@ const userHabit : Module<UserHabit,RootState> = {
}) })
}) })
} }
return Promise.all(getList.map(item => axiosGet(item))) return await Promise.all(getList.map(item => axiosGet(item)))
// Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:'DesignElementsEnum'}}).then((rv: any) => { // Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:'DesignElementsEnum'}}).then((rv: any) => {
// if (rv) { // if (rv) {
// rv.forEach((item:any) => { // rv.forEach((item:any) => {

View File

@@ -342,7 +342,7 @@
<createSlogan ref="createSlogan" @setSloganData="setSloganData"></createSlogan> <createSlogan ref="createSlogan" @setSloganData="setSloganData"></createSlogan>
<!-- 蒙层 start--> <!-- 蒙层 start-->
<div class="mark_loading" v-show="isShowMark"> <div class="mark_loading" v-show="isShowMark || getLangIsShowMark">
<a-spin size="large" /> <a-spin size="large" />
<!-- <div v-show="remGenerate" class="mark_loading_btn" @click="removeGenerate">{{$t('Generate.Close')}}</div> --> <!-- <div v-show="remGenerate" class="mark_loading_btn" @click="removeGenerate">{{$t('Generate.Close')}}</div> -->
@@ -388,6 +388,11 @@ export default defineComponent({
sketchCategory, sketchCategory,
createSlogan, createSlogan,
}, },
props:{
getLangIsShowMark:{
type:Boolean,
}
},
setup() { setup() {
const store = useStore(); const store = useStore();
let menuList = computed(()=>{ let menuList = computed(()=>{
@@ -613,7 +618,6 @@ export default defineComponent({
this.uploadUrl = getUploadUrl() this.uploadUrl = getUploadUrl()
this.getLibraryList('') this.getLibraryList('')
this.getClass() this.getClass()
this.getSex()
this.token = getCookie("token") || ""; this.token = getCookie("token") || "";
this.workspace = computed(()=>{ this.workspace = computed(()=>{
return this.store?.state?.Workspace?.workspace return this.store?.state?.Workspace?.workspace
@@ -646,7 +650,8 @@ export default defineComponent({
// params = 'MalePosition' // params = 'MalePosition'
// } // }
this.store.commit('setPosition',this.sex) this.store.commit('setPosition',this.sex)
this.designType = this.designTypeList.Sketchboard?.[0].value this.designType = this.store.state.UserHabit.Position?.[0].value
// this.designType = this.designTypeList?.Sketchboard?.[0].value
// await Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:params}}).then((rv: any) => { // await Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:params}}).then((rv: any) => {
// if (rv) { // if (rv) {
@@ -722,6 +727,9 @@ export default defineComponent({
if(this.selectCode != 'DesignElements'){ if(this.selectCode != 'DesignElements'){
this.getClass() this.getClass()
} }
if(this.selectCode == 'Sketchboard')this.getSex()
this.getLibraryList('') this.getLibraryList('')
this.captionGeneration = '' this.captionGeneration = ''
this.selectGenerateList = [] this.selectGenerateList = []