新增 删除 衣服

This commit is contained in:
X1627315083
2023-12-13 16:09:17 +08:00
parent e6c8fe3866
commit a0a8ab9a17
27 changed files with 608 additions and 260 deletions

View File

@@ -33,7 +33,7 @@
<img :src="item?.path" alt="">
<i v-show="deleteShow" class="fi fi-br-cross" @click.stop="setDelete(index)"></i>
</div>
<div class="detail_modal_body_Set" @click="setClothesOpen()">
<div v-show="designItemDetailNum < 5" class="detail_modal_body_Set" @click="setClothesOpen()">
+
</div>
</div>
@@ -172,7 +172,7 @@ export default defineComponent({
// return store.state.DesignDetailModule.designItemDetail
// })
let designItemDetail :any = computed(()=>{
console.log(123);
console.log(store.state.DesignDetailModule.designItemDetail,'-=-=--==--==-');
return store.state.DesignDetailModule.designItemDetail
})
@@ -211,6 +211,8 @@ export default defineComponent({
let setClothes:any = ref()
//点击删除按钮
let deleteShow:any = ref(false)
let designItemDetailNum:any = ref(0)
return{
designItemDetail,
store,
@@ -233,6 +235,7 @@ export default defineComponent({
t,
setClothes,
deleteShow,
designItemDetailNum,
}
},
data(){
@@ -248,7 +251,6 @@ export default defineComponent({
watch:{
designItemDetail:{
handler: async function(newVal,oldVal) {
console.log(1123);
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
this.ifSubmit = designItemDetail.ifSubmit?designItemDetail.ifSubmit:false
this.current = JSON?.parse(JSON?.stringify(designItemDetail?.clothes?.[this?.currentIndex]))
@@ -257,12 +259,23 @@ export default defineComponent({
}else{
this.body = true
}
let num = 0
newVal.clothes.forEach((item:any) => {
if(item.id){
num++
}
});
this.designItemDetailNum = num
await this.setImgSize()
this.designItemDetailUrl = designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
}
},
currentIndex:{
handler: function(newval) {
let url = ''
if(designItemDetail.currentFullBodyView){
url = designItemDetail.currentFullBodyView
}else{
url = designItemDetail.designItemUrl
}
this.designItemDetailUrl = url
// console.log(designItemDetail.currentFullBodyView,designItemDetail.designItemUrl);
}
},
designDetailShow:{
@@ -346,7 +359,8 @@ export default defineComponent({
this.moible = isMoible()
this.designItemId = data.design.designItemId
this.designOutfitId = data.design.designOutfitId
let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}`
// let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}`
let url = Https.httpUrls.getDesignDetail + `?designItemId=45192&designPythonOutfitId=44898`
this.parentData = data
this.loadingShow = true
Https.axiosGet(url).then(
@@ -362,6 +376,7 @@ export default defineComponent({
item.printObject.prints = [{}]
}
})
this.currentIndex = 0
this.store.commit('setDesignItemDetail',rv)
this.removeRevocation()
this.setRevocation(rv,'')
@@ -418,7 +433,6 @@ export default defineComponent({
let frontIndex = 6
let backIndex = 3
designItemDetail.clothes.forEach((v:any,index:any)=>{
for (let i = v.layersObject.length-1; i >= 0; i--) {
v.layersObject[i].style = {
top:v.layersObject[i].position?.[0]*ratio+'px',
@@ -434,10 +448,10 @@ export default defineComponent({
v.layersObject[i].designOpenrtionBtn = false
if(v.layersObject[i].imageCategory.indexOf("back") == -1){
front[index] = v.layersObject[i]
front[index].style.zIndex = frontIndex-=1
front[index].style.zIndex = v.priority
}else{
back[index] = v.layersObject[i]
back[index].style.zIndex = backIndex-=1
back[index].style.zIndex = v.priority
// back[index].style.zIndex = backIndex==0?v.layersObject[i]:backIndex++
}
}
@@ -537,11 +551,14 @@ export default defineComponent({
sessionStorage.setItem('oppositeRevocation', JSON.stringify(oppositeRevocation));
sessionStorage.setItem('revocation', JSON.stringify(revocation));
},
setSubmitItem(str:any){
setSubmitItem(str:any,sub:any){
//sub判断是不是点击新增图层又直接点击删除
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
let clothes:any = []
designItemDetail.clothes.forEach((item:any) => {
let num = -1
// let zIndex = 10
designItemDetail.clothes.forEach((item:any,index:number) => {
let clothesItem = {
color: `${item.color.r} ${item.color.g} ${item.color.b}`,
id:item.id,
@@ -553,11 +570,20 @@ export default defineComponent({
// path:item.printObject.path?item.printObject.path :'',
prints:item?.printObject?.prints[0]?.minIOPath?item?.printObject?.prints:[]
},
priority:item.priority,
type:item.type,
}
clothes.push(clothesItem)
if(!item.id && sub){
num = index
}else{
clothes.push(clothesItem)
}
});
if(num != -1){
designItemDetail.clothes.splice(num,1)
this.store.commit("setDesignItemDetail", designItemDetail);
}
this.currentIndex = 0
let data = {
designItemId:designItemDetail.designItemId,
// designItemId:designItemDetail.designItemId,
@@ -573,17 +599,17 @@ export default defineComponent({
data.isPreview = false
delete data.ifSubmit
}
this.store.commit('setDesignPreviewData',data)
// this.store.commit('setDesignPreviewData',data)
return data
},
async setSubmit(str:any){
let setDesignItem:any = isMoible() ? this.$refs.setDesignItemMobile : this.$refs.setDesignItem
let data = this.setSubmitItem(str)
let data = this.setSubmitItem(str,true)
this.loadingShow = true
await setDesignItem.setPreview(data)
},
async submit(){
let data = this.setSubmitItem('')
let data = this.setSubmitItem('',true)
this.loadingShow = true
Https.axiosPost(Https.httpUrls.designSingle, data).then(
(rv: any) => {
@@ -625,6 +651,9 @@ export default defineComponent({
// nextTick().then(()=>{
// })
console.log(modal_body);
if(modal_body == undefined){
this.setPostition(url)
}
function loadImage(url:any) {
return new Promise((resolve, reject) => {
const img = new Image();
@@ -695,12 +724,13 @@ export default defineComponent({
DesignDetailAlter.changePlace()
}else{
this.deleteShow = false
let data = this.setSubmitItem('preview')
this.loadingShow = true
let data = this.setSubmitItem('preview',true)
Https.axiosPost(Https.httpUrls.designSingle, data).then(
(rv) => {
let designItemDetail = JSON.parse(JSON.stringify(this.designItemDetail))
designItemDetail.ifSubmit = true
this.loadingShow = false
console.log(rv);
this.store.commit("setDesignItemDetail", designItemDetail);
this.store.commit("setDesignPreviewData", data);
this.setRevocation(designItemDetail,data)
@@ -757,6 +787,7 @@ export default defineComponent({
// this.designOrder = true
// let DesignDetailAlter:any = this.$refs.DesignDetailAlter
// DesignDetailAlter.changePlace()
this.designOrder = true
if(this.designItemDetail.clothes[this.designItemDetail.clothes.length-1].id){
this.designItemDetail.clothes.push(aa)
this.clothesDetail(aa,this.designItemDetail.clothes.length-1)
@@ -772,15 +803,21 @@ export default defineComponent({
clothesDetail(clothes:any, index:number){
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
this.currentIndex = index?index:0
this.designOrder = true
this.current = designItemDetail.clothes[this.currentIndex]
let data:any = this.setSubmitItem('preview')
this.current = designItemDetail.clothes[index]
if(this.current.id && !designItemDetail.clothes[designItemDetail.clothes.length-1].id){
designItemDetail.clothes.splice(designItemDetail.clothes.length-1,1)
this.store.commit('setDesignItemDetail',designItemDetail)
}
let data:any = this.setSubmitItem('preview',false)
this.currentIndex = index?index:0
data.designSingleItemDTOList[this.currentIndex] = {
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
id:this.current.id?this.current.id:'',
path:this.current.minIOPath?this.current.minIOPath:'',
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
priority:this.current.priority,
scale:this.current.layersObject?.[1]?.scale?this.current.layersObject[1].scale:1,
printObject:{
ifSingle:this.current?.printObject?.ifSingle == null ? false : this.current?.printObject?.ifSingle,
@@ -945,6 +982,7 @@ export default defineComponent({
height: 4rem;
cursor: pointer;
text-align: center;
margin-left: .3rem;
img{
// width: 100%;
height: 100%;
@@ -960,11 +998,11 @@ export default defineComponent({
}
}
>div:nth-child(1){
margin-right: 1rem;
margin-left: 0rem;
}
}
.detail_modal_item_front:last-child{
z-index: 1 !important;
// z-index: 1 !important;
}
>img{
width: 100%;

View File

@@ -535,31 +535,40 @@ export default defineComponent({
},
upFileUploadChange(data) {
let file = data.file;
let bor = true
if (file.status === "done") {
let res = JSON.parse(file.xhr.response);
file.id = res.data.id;
file.url = res.data.url;
file.resData = res.data;
file.designType = res.data.designType
file.category = this.current;
file.minIOPath = file.resData.minIOPath
let fileList = this.uploadList.filter(
(v) => v.status === "done"
);
if (this.uploadList.length >= 8) {
message.info(this.t('DesignDetailAlter.jsContent2'));
} else {
// this.store.commit("setSketchboardFile", fileList);
this.uploadList = fileList
// this.store.commit("clearMoodTemplateId");
if(this.selectCode == 'Sketchboard'){
this.apparelList = this.uploadList
}else{
this.printList = this.uploadList
if(res.errCode == 0){
file.id = res.data.id;
file.url = res.data.url;
file.resData = res.data;
file.designType = res.data.designType
file.category = this.current;
file.minIOPath = file.resData.minIOPath
let fileList = this.uploadList.filter(
(v) => v.status === "done"
);
if (this.uploadList.length >= 8) {
message.info(this.t('DesignDetailAlter.jsContent2'));
} else {
// this.store.commit("setSketchboardFile", fileList);
this.uploadList = fileList
// this.store.commit("clearMoodTemplateId");
if(this.selectCode == 'Sketchboard'){
this.apparelList = this.uploadList
}else{
this.printList = this.uploadList
}
}
}
}else{
bor = false
}
} else if (file.status === "error") {
let index = -1;
bor = false
}
if(!bor){
let index = -1;
this.uploadList.forEach((ele, index1) => {
if (file.uid === ele.uid) {
index = index1;
@@ -568,8 +577,9 @@ export default defineComponent({
if (index > -1) {
this.uploadList.splice(index, 1);
}
message.warning(file.name + this.t('DesignDetailAlter.jsContent3'));
}
// message.warning(file.name + this.t('DesignDetailAlter.jsContent3'));
message.warning(res.errMsg);
}
},

View File

@@ -236,16 +236,23 @@ export default defineComponent({
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
let index
let data = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designPreviewData))
let bor = false
// let bor = false
let zIndex = 10
designItemDetail.clothes.forEach((v,ind)=>{
if(v.id == this.current.id){
index = ind
bor = true
// bor = true
}
if(v.priority){
if(zIndex < v.priority){
zIndex = v.priority
}
}
})
console.log(this.current);
if(this.type_ == 1 && bor){
if(!this.current.id){
data.designSingleItemDTOList[index].priority = zIndex+=1
}
if(this.type_ == 1){
if(data.designSingleItemDTOList[index].path != this.sketchImg.minIOPath && this.sketchImg.id_){
data.designSingleItemDTOList[index].offset = [0,0]
data.designSingleItemDTOList[index].scale = 1
@@ -253,50 +260,53 @@ export default defineComponent({
data.designSingleItemDTOList[index].id = this.sketchImg.id_? this.sketchImg.id_:this.current.id_
data.designSingleItemDTOList[index].path =this.sketchImg.minIOPath? this.sketchImg.minIOPath: this.current.minIOPath
data.designSingleItemDTOList[index].type =this.sketchImg.type? this.sketchImg.type: this.current.type
}else if(this.type_ == 2 && bor){
}else if(this.type_ == 2){
data.designSingleItemDTOList[index].printObject.ifSingle = false
data.designSingleItemDTOList[index].printObject.prints = []
}else if(this.type_ == 3 && bor){
}else if(this.type_ == 3){
let color = `${this.$parent.selectColor.rgba.r} ${this.$parent.selectColor.rgba.g} ${this.$parent.selectColor.rgba.b}`
data.designSingleItemDTOList[index].color = color
}
if(!bor){
index = designItemDetail.clothes.length
let color = `${this.$parent.selectColor.rgba.r} ${this.$parent.selectColor.rgba.g} ${this.$parent.selectColor.rgba.b}`
let obj = {
"color": color,
"id": this.sketchImg.id_? this.sketchImg.id_:this.current.id_,
"path": this.sketchImg.minIOPath? this.sketchImg.minIOPath: this.current.minIOPath,
"offset": [
0,
0
],
"scale": 1,
"printObject": {
"ifSingle": false,
"prints": [
]
},
"type": this.sketchImg.type
}
return
// data.designSingleItemDTOList.push(obj)
// designItemDetail.clothes.push(obj)
}
// if(!bor){
// index = designItemDetail.clothes.length
// let color = `${this.$parent.selectColor.rgba.r} ${this.$parent.selectColor.rgba.g} ${this.$parent.selectColor.rgba.b}`
// let obj = {
// "color": color,
// "id": this.sketchImg.id_? this.sketchImg.id_:this.current.id_,
// "path": this.sketchImg.minIOPath? this.sketchImg.minIOPath: this.current.minIOPath,
// "offset": [
// 0,
// 0
// ],
// "scale": 1,
// "printObject": {
// "ifSingle": false,
// "prints": [
// ]
// },
// priority:zIndex,
// "type": this.sketchImg.type
// }
// // data.designSingleItemDTOList.push(obj)
// // designItemDetail.clothes.push(obj)
// }
// return
data.timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
this.loadingShow = true
Https.axiosPost(Https.httpUrls.designSingle, data).then(
(rv) => {
rv.clothes.forEach((item)=>{
console.log(item.id , designItemDetail.clothes[index].id);
if(item.id == this.sketchImg.id_){
console.log(item, designItemDetail.clothes[index]);
console.log(item,item.id , designItemDetail.clothes[index].id);
designItemDetail.clothes[index].color = item.color
designItemDetail.clothes[index].printObject = item.printObject
designItemDetail.clothes[index].layersObject = item.layersObject
designItemDetail.clothes[index].minIOPath = item.minIOPath
designItemDetail.clothes[index].path = item.path
designItemDetail.clothes[index].id = item.id
designItemDetail.clothes[index].type = item.type
designItemDetail.clothes[index].priority = zIndex
}
})
designItemDetail.currentFullBodyView = rv.currentFullBodyView

View File

@@ -30,7 +30,6 @@ export default defineComponent({
};
},
mounted() {
},
directives:{
mousemove:{

View File

@@ -1,6 +1,11 @@
<template>
<div class="design_compile_content" id="design_compile_content">
<div class="designOpenrtion_centent" id="designOpenrtionCentent">
<div class="detail_modal_body_nav">
<div v-for="item,index in designItemDetail?.clothes" v-show="item.id" :class="{active:item.clothesOpen}" @click="clothesOpen(index)">
<img :src="item?.path" alt="">
</div>
</div>
<div class="designOpenrtion_imgMask" :style="frontBack?.body?.style">
<!-- <div
v-for="item,index in frontBack.back"
@@ -77,7 +82,7 @@ export default defineComponent({
]);
let direction = ref('')
let imgDom = ref()
let imgDomIndex = ref(0)
let imgDomIndex = ref(2)
let frontBack = ref({})
return {
designItemDetail,
@@ -156,13 +161,20 @@ export default defineComponent({
v.layersObject[i].designOpenrtionBtn = false
if(v.layersObject[i].imageCategory.indexOf("back") == -1){
front[index] = v.layersObject[i]
front[index].style.zIndex = frontIndex-=1
front[index].style.zIndex = v.priority
front[index].id = v.id
}else{
back[index] = v.layersObject[i]
back[index].style.zIndex = backIndex-=1
back[index].style.zIndex = v.priority
back[index].id = v.id
// back[index].style.zIndex = backIndex==0?v.layersObject[i]:backIndex++
}
if(this.printZIndex < v.priority){
this.printZIndex = v.priority
}
}
this.printZIndex++
})
let bodyImgWH = document.getElementsByClassName("design_compile_content")[0].getElementsByClassName("perview_img")[0]
@@ -200,13 +212,16 @@ export default defineComponent({
this.frontBack.front[index].designOpenrtionBtn = true
this.frontBack.front[index].style.zIndex = this.printZIndex++
this.frontBack.back[index].style.zIndex = this.printZIndex
this.clothesOpenActive(index)
},
// 设置移动
itemMoveMousedown(index,event){
itemMoveMousedown(index,e){
this.imgDomIndex = index
this.frontBack.front.forEach((v)=>{
v.designOpenrtionBtn = false
})
this.clothesOpenActive(index)
let event = e||window.event
this.imgDom = document.getElementsByClassName('design_compile_content')[0].getElementsByClassName("detail_modal_item_front")[this.imgDomIndex]
this.frontBack.front[index].designOpenrtionBtn = true
this.frontBack.front[index].style.zIndex = this.printZIndex++
@@ -337,6 +352,25 @@ export default defineComponent({
item.designOpenrtionBtn = false
})
},
clothesOpen(index){
this.imgDomIndex = index
this.clothesOpenActive(index)
this.setpitch('',index)
},
clothesOpenActive(index){
this.designItemDetail.clothes.forEach((item)=>{
item.clothesOpen = false
})
this.designItemDetail.clothes[index].clothesOpen = true
},
sort(arr){
arr.sort((a, b) => {
var a_num = a.style.zIndex;
var b_num = b.style.zIndex;
return a_num - b_num;
});
return arr
},
async setPreview(data){
let ratio = this.frontBack.body.layersObject[0].imageSize[0]/this.frontBack.body.style.width.replace(/px/g,'')
let designItemDetail = this.store.state.DesignDetailModule.designItemDetail
@@ -345,17 +379,19 @@ export default defineComponent({
// var b_num = b.style.zIndex;
// return a_num - b_num;
// });
// this.frontBack.front.sort((a, b) => {
// var a_num = a.style.zIndex;
// var b_num = b.style.zIndex;
// return a_num - b_num;
// });
let arr = this.sort(JSON.parse(JSON.stringify(this.frontBack.front)))
let num = 10
arr.forEach((item)=>{
item.priority = num++
})
data.designSingleItemDTOList.forEach((item)=>{
let front = this.frontBack.front
let imageCategory1 = front[1].imageCategory
front.forEach((i)=>{
let front = arr
let imageCategory1 = arr[1].imageCategory
arr.forEach((i)=>{
let imageCategory = i.imageCategory.split('_')[0]
if(item.type == this.capitalizeFirstLetter(imageCategory)){
if(item.id == i.id){
let y = ((i?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - i?.position[0])
let x = ((i?.style?.left.replace(/px/g,'')*ratio).toFixed(0) - i?.position[1])
let scale = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale)).toFixed(2)):1
@@ -363,6 +399,7 @@ export default defineComponent({
let top = y == 0 ? item.offset[1]:y+item.offset[1]
let left = x == 0 ? item.offset[0]:x+item.offset[0]
item.offset = [left,top]
item.priority = i.priority
// item.offset = [(i?.style?.left.replace(/px/g,'')*ratio).toFixed(0),(i?.style?.top.replace(/px/g,'')*ratio).toFixed(0)]
}
})
@@ -379,11 +416,14 @@ export default defineComponent({
designItemDetail.currentFullBodyView = rv.currentFullBodyView
rv.clothes.forEach((item)=>{
designItemDetail.clothes.forEach((i)=>{
if(item.type === i.type){
if(item.id === i.id){
i.layersObject = item.layersObject
i.priority = item.layersObject[0].priority
console.log(item,i);
}
})
})
console.log(designItemDetail,'============================');
this.$emit('setDesignCoverage');
this.store.commit("setDesignItemDetail", designItemDetail);
this.setRevocation(designItemDetail,data)
@@ -451,6 +491,40 @@ export default defineComponent({
top: 0;
}
}
.detail_modal_body_nav{
display: flex;
position: relative;
top: 0;
left: 50%;
z-index: 999;
transform: translate(-50%,-0%);
transition: all .3s;
justify-content: center;
margin-bottom: 1rem;
>div{
width: 4rem;
height: 4rem;
cursor: pointer;
text-align: center;
margin-left: .3rem;
img{
// width: 100%;
height: 100%;
max-width: 100%;
object-fit: cover;
}
&.active{
border: 2px solid rgba(0,0,0,0.4);
img{
transform: scale(.8);
opacity: .8;
}
}
}
>div:nth-child(1){
margin-left: 0rem;
}
}
.designOpenrtion_print,.detail_modal_item_front{
z-index: 1;
img{

View File

@@ -1,6 +1,11 @@
<template>
<div class="design_compile_content" id="design_compile_content">
<div class="designOpenrtion_centent" id="designOpenrtionCentent">
<div class="detail_modal_body_nav">
<div v-for="item,index in designItemDetail?.clothes" v-show="item.id" :class="{active:item.clothesOpen}" @click="clothesOpen(index)">
<img :src="item?.path" alt="">
</div>
</div>
<div class="designOpenrtion_imgMask" :style="frontBack?.body?.style">
<!-- <div
v-for="item,index in frontBack.back"
@@ -200,6 +205,7 @@ export default defineComponent({
this.frontBack.front[index].designOpenrtionBtn = true
this.frontBack.front[index].style.zIndex = this.printZIndex++
this.frontBack.back[index].style.zIndex = this.printZIndex
this.clothesOpenActive(index)
},
// 设置移动
itemMoveMousedown(index,event){
@@ -207,6 +213,7 @@ export default defineComponent({
this.frontBack.front.forEach((v)=>{
v.designOpenrtionBtn = false
})
this.clothesOpenActive(index)
this.imgDom = document.getElementsByClassName('design_compile_content')[0].getElementsByClassName("detail_modal_item_front")[this.imgDomIndex]
this.frontBack.front[index].designOpenrtionBtn = true
this.frontBack.front[index].style.zIndex = this.printZIndex++
@@ -339,6 +346,17 @@ export default defineComponent({
item.designOpenrtionBtn = false
})
},
clothesOpen(index){
this.imgDomIndex = index
this.clothesOpenActive(index)
this.setpitch('',index)
},
clothesOpenActive(index){
this.designItemDetail.clothes.forEach((item)=>{
item.clothesOpen = false
})
this.designItemDetail.clothes[index].clothesOpen = true
},
async setPreview(data){
let ratio = this.frontBack.body.layersObject[0].imageSize[0]/this.frontBack.body.style.width.replace(/px/g,'')
let designItemDetail = this.store.state.DesignDetailModule.designItemDetail
@@ -347,11 +365,16 @@ export default defineComponent({
// var b_num = b.style.zIndex;
// return a_num - b_num;
// });
// this.frontBack.front.sort((a, b) => {
// var a_num = a.style.zIndex;
// var b_num = b.style.zIndex;
// return a_num - b_num;
// });
let arr = JSON.parse(JSON.stringify(this.frontBack.front))
arr.sort((a, b) => {
var a_num = a.style.zIndex;
var b_num = b.style.zIndex;
return a_num - b_num;
});
let num = 10
arr.forEach((item)=>{
item.priority = num++
})
data.designSingleItemDTOList.forEach((item)=>{
let front = this.frontBack.front
let imageCategory1 = front[1].imageCategory
@@ -365,6 +388,7 @@ export default defineComponent({
let top = y == 0 ? item.offset[1]:y+item.offset[1]
let left = x == 0 ? item.offset[0]:x+item.offset[0]
item.offset = [left,top]
item.priority = i.priority
// item.offset = [(i?.style?.left.replace(/px/g,'')*ratio).toFixed(0),(i?.style?.top.replace(/px/g,'')*ratio).toFixed(0)]
}
})
@@ -453,6 +477,40 @@ export default defineComponent({
top: 0;
}
}
.detail_modal_body_nav{
display: flex;
position: relative;
top: 0;
left: 50%;
z-index: 999;
transform: translate(-50%,-0%);
transition: all .3s;
justify-content: center;
margin-bottom: 1rem;
>div{
width: 4rem;
height: 4rem;
cursor: pointer;
text-align: center;
margin-left: .3rem;
img{
// width: 100%;
height: 100%;
max-width: 100%;
object-fit: cover;
}
&.active{
border: 2px solid rgba(0,0,0,0.4);
img{
transform: scale(.8);
opacity: .8;
}
}
}
>div:nth-child(1){
margin-left: 0rem;
}
}
.designOpenrtion_print,.detail_modal_item_front{
z-index: 1;
img{

View File

@@ -395,8 +395,6 @@ export default defineComponent({
})
if(num == 2 || num == 1){
if(this.driver__.driver){
console.log(213);
driverObj__.moveNext()
}
}
@@ -520,31 +518,41 @@ export default defineComponent({
fileUploadChange(data: any) {
let file = data.file;
let bor = true
if (file.status === "done") {
let res = JSON.parse(file.xhr.response);
file.id = res.data.id;
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = "upload";
file.id_ = GO.id++;
file.category = this.sketchCatecoryList?.[0]?.name;
file.categoryValue = this.sketchCatecoryList?.[0]?.value;
let fileList = this.sketchboardList.filter(
(v: any) => v.status === "done"
);
let arr = this.store.state.UploadFilesModule.sketchboard;
if (arr.length >= 8) {
message.info(this.t('Generate.jsContent6'));
} else {
this.sketchboardList = fileList
}
nextTick().then(()=>{
if(this.driver__.driver){
driverObj__.moveNext()
if(res.errCode == 0){
file.id = res.data.id;
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = "upload";
file.id_ = GO.id++;
file.category = this.sketchCatecoryList?.[0]?.name;
file.categoryValue = this.sketchCatecoryList?.[0]?.value;
let fileList = this.sketchboardList.filter(
(v: any) => v.status === "done"
);
let arr = this.store.state.UploadFilesModule.sketchboard;
if (arr.length >= 8) {
message.info(this.t('Generate.jsContent6'));
} else {
this.sketchboardList = fileList
}
})
nextTick().then(()=>{
if(this.driver__.driver){
driverObj__.moveNext()
}
})
}else{
bor = false
}
} else if (file.status === "error") {
let index = -1;
bor = false
}
if(!bor){
let index = -1;
let res:any = JSON.parse(file.xhr.response);
this.sketchboardList.forEach((ele: any, index1: any) => {
if (file.uid === ele.uid) {
index = index1;
@@ -553,8 +561,9 @@ export default defineComponent({
if (index > -1) {
this.sketchboardList.splice(index, 1);
}
message.warning(file.name + this.t('Generate.jsContent7'));
}
// message.warning(file.name + this.t('SketchboardUpload.jsContent1'));
message.warning(res.errMsg);
}
},
showFileCategory(file: any) {
file.categoryShow = true;

View File

@@ -308,28 +308,37 @@ export default defineComponent({
},
fileUploadChange(data: any) {
let file = data.file;
let bor = true
if (file.status === "done") {
let res = JSON.parse(file.xhr.response);
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = {
type1:'upload',
type2:'Moodboard'
};
file.id_ = GO.id++
file.id = res.data.id
let fileList = this.fileList.filter(
(v: any) => v.status === "done"
);
let arr = this.store.state.UploadFilesModule.moodboard
if(arr.length >= 8){
message.info(this.t('MoodboardUpload.jsContent1'))
if(res.errCode == 0){
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = {
type1:'upload',
type2:'Moodboard'
};
file.id_ = GO.id++
file.id = res.data.id
let fileList = this.fileList.filter(
(v: any) => v.status === "done"
);
let arr = this.store.state.UploadFilesModule.moodboard
if(arr.length >= 8){
message.info(this.t('MoodboardUpload.jsContent1'))
}else{
this.store.commit("setMoodboardFile", fileList);
}
}else{
this.store.commit("setMoodboardFile", fileList);
bor = false
}
// this.showFileList = this.fileList
} else if (file.status === "error") {
let index = -1;
bor = false
}
if(!bor){
let res:any = JSON.parse(file.xhr.response);
let index = -1;
this.fileList.forEach((ele: any, index1: any) => {
if (file.uid === ele.uid) {
index = index1;
@@ -338,9 +347,9 @@ export default defineComponent({
if (index > -1) {
this.fileList.splice(index, 1);
}
message.warning(file.name + this.t('MoodboardUpload.jsContent2'));
}
// message.warning(file.name + this.t('MoodboardUpload.jsContent2'));
message.warning(res.errMsg);
}
},
beforeUpload(file: any) {
const isJpgOrPng =

View File

@@ -11,10 +11,10 @@
{{item.str}}
</span>
<div class="driver__btn" v-if="item.driver">
<span @click="setDriver">
<span @click="setDriver(index)">
Yes
</span>
<span @click="removeDriver">
<span @click="removeDriver(index)">
No
</span>
</div>
@@ -114,7 +114,6 @@ export default defineComponent({
watch:{
driver__:{
handler: function(newval) {
console.log(this.driver__);
if(this.driver__.driver && this.driver__.index == 0){
this.robotTop = true
this.robotInput = true
@@ -124,8 +123,6 @@ export default defineComponent({
str:"Welcome to AiDA. I am your friendly fashion design assistant. If you have any questions or need assistance, please don't hesitate to ask. ",
driver:false,
})
console.log(this.record);
this.textScroll()
setTimeout(() => {
this.record.push({
@@ -146,7 +143,7 @@ export default defineComponent({
}else{
clearTimeout(this.driver__Time)
}
if(!newval.driver){
if(!newval.driver && this.driver__.index != 0){
this.record.push({
state:1,
str:"You can start the tutorial at any time by simply telling me that you want to. ",
@@ -290,11 +287,12 @@ export default defineComponent({
Https.axiosPost(Https.httpUrls.chatStreamTest, data).then(
// Https.axiosPost(Https.httpUrls.pythonChatStream, data,interaction).then(
(rv) => {
if(rv){
if(rv.isTutorial){
this.record.push({
state:1,
str:"We need to refresh the page before starting the tutorial,Would you like to start the tutorial now?",
str:"We need to refresh the page before starting the tutorial. Would you like to start the tutorial now?",
driver:true,
})
}else{
@@ -325,7 +323,7 @@ export default defineComponent({
});
this.chatCentent = ""
},
setDriver(){
setDriver(index:number){
if(this.driver__.driver){
driverObj__.moveNext();
this.robotTop = false
@@ -335,8 +333,11 @@ export default defineComponent({
setCookie("isBeginner", true);
setCookie("isBeginnerNum", 1);
}
this.record[index].driver = false
sessionStorage.setItem('record', JSON.stringify(this.record));
this.textScroll()
},
removeDriver(){
removeDriver(index:number){
if(this.driver__.driver){
driverObj__.destroy();
let data = {
@@ -348,6 +349,9 @@ export default defineComponent({
// this.robotInput = false
this.createTimer()
}
this.record[index].driver = false
sessionStorage.setItem('record', JSON.stringify(this.record));
this.textScroll()
},
likeFile(item:any,imgIndex:number,index:number){
let data = {

View File

@@ -378,9 +378,6 @@ export default defineComponent({
workspaceCom(newVal,oldVal){
this.workspace = newVal
this.upload.gender = newVal.sexEnum.name
console.log(this.workspace);
// this.getPosition()
},
sketchboardList:{
handler(newVal:any,oldVal:any){
@@ -437,28 +434,36 @@ export default defineComponent({
},
fileUploadChange(data: any) {
let file = data.file;
let bor = true
if (file.status === "done") {
let res = JSON.parse(file.xhr.response);
file.imgUrl = res.data.url;
file.resData = res.data;
// file.pin = false;
//category用来数据处理
file.categoryValue = this.sketchCatecoryList?.[0]?.value;
file.category = this.sketchCatecoryList?.[0]?.name;
file.categoryShow = false;
file.id_ = GO.id++
file.id = res.data.id
file.type_ = {
type1:'upload',
type2:'Sketchboard'
};
let fileList = this.fileList.filter(
(v: any) => v.status === "done"
);
this.store.commit("setSketchboardFile", fileList);
} else if (data.errCode === -1) {
let index = -1;
if(res.errCode == 0){
file.imgUrl = res.data.url;
file.resData = res.data;
// file.pin = false;
//category用来数据处理
file.categoryValue = this.sketchCatecoryList?.[0]?.value;
file.category = this.sketchCatecoryList?.[0]?.name;
file.categoryShow = false;
file.id_ = GO.id++
file.id = res.data.id
file.type_ = {
type1:'upload',
type2:'Sketchboard'
};
let fileList = this.fileList.filter(
(v: any) => v.status === "done"
);
this.store.commit("setSketchboardFile", fileList);
}else{
bor = false
}
} else if (file.status === "error") {
bor = false
}
if(!bor){
let index = -1;
let res:any = JSON.parse(file.xhr.response);
this.fileList.forEach((ele: any, index1: any) => {
if (file.uid === ele.uid) {
index = index1;
@@ -467,9 +472,9 @@ export default defineComponent({
if (index > -1) {
this.fileList.splice(index, 1);
}
message.warning(file.name + this.t('SketchboardUpload.jsContent1'));
}
// message.warning(file.name + this.t('SketchboardUpload.jsContent1'));
message.warning(res.errMsg);
}
},
beforeUpload(file: any) {

View File

@@ -237,16 +237,12 @@ export default defineComponent({
});
let str
if(numTop >= 8){
console.log(1);
str = `top ${topStr.join(' and ')}`
return this.isPin(str)
}else if(numBottom >= 8){
console.log(2);
str = `bottom ${bottomStr.join(' and ')}`
return this.isPin(str)
}else{
console.log(3);
return true
}

View File

@@ -2,7 +2,7 @@
<a-modal class="library_setLabel"
v-model:visible="setLabelShow"
:footer="null"
title="Edit tag"
:title="$t('setLabel.EditTag')"
width="65%"
:maskClosable="false"
:keyboard="false"
@@ -182,7 +182,7 @@ export default defineComponent({
}else if(v == 'affirm'){
if(index == -1){
if(this.itemName == ''){
message.warning(this.t('Habit.jsContent2'));
message.warning(this.t('setLabel.jsContent1'));
return
}else{

View File

@@ -322,4 +322,15 @@ export default {
uploadFile:{
jsContent1:'您最多可以选择{maxImg}张图片哦',
},
isTest:{
available:"此功能对试用用户不可用。",
src:"此功能对试用用户不开放,请点击进行订阅。->",
userName:'试用用户',
loginIsTest:"您是试用用户,试用期到 {date}。为了用户数据的安全,我们不会保存试用用户上传的任何个人数据,并会在每次注销后擦除个人数据。如果您需要订阅,请点击 ->",
image:'由于您是试用用户您只能上传10张图片。'
},
setLabel:{
EditTag:'编辑标签',
jsContent1:'请输入标签名称',
}
}

View File

@@ -329,5 +329,9 @@ export default {
userName:'Trial User',
loginIsTest:"You are a trial user, Probation period until{date}. For the security of users' data, we do not save any personal data uploaded by trial users, and will erase personal data after each logout. if you need to subscribe, please click ->",
image:'Because you are a trial user, you can only upload 10 images'
},
setLabel:{
EditTag:'Edit tag',
jsContent1:'Please enter a tag name',
}
}

View File

@@ -323,4 +323,15 @@ export default {
uploadFile:{
jsContent1:"Vous pouvez sélectionner jusqu'à {maxImg} images",
},
isTest:{
available:"Cette fonctionnalité n'est pas disponible pour les utilisateurs d'essai.",
src:"Cette fonction n'est pas accessible aux utilisateurs d'essai. Si vous avez besoin de vous abonner, veuillez cliquer sur ->",
userName:"Utilisateur d'essai",
loginIsTest:"Vous êtes un utilisateur d'essai, période de probation jusqu'au {date}. Pour la sécurité des données des utilisateurs, nous ne sauvegardons aucune donnée personnelle téléchargée par les utilisateurs d'essai et effaçons les données personnelles après chaque déconnexion. Si vous avez besoin de vous abonner, veuillez cliquer sur ->",
image:"En tant qu'utilisateur d'essai, vous ne pouvez télécharger que 10 images."
},
setLabel:{
EditTag:'Modifier le tag',
jsContent1:'Veuillez saisir un nom de tag',
}
}

View File

@@ -1,13 +1,13 @@
import { createI18n } from 'vue-i18n'
// 中文 zh-cn
// 英文 en
// 韩文 kr
// 日文 ja
// 俄语 ru
// 法语 fr
// 意大利语 it
// 日文 ja
// 韩文 kr
// 俄语 ru
// 泰语 th
// 越南语 vn
// 意大利语 it
// element-plus 中的语言配置
import elementEnLocale from './en'

View File

@@ -322,4 +322,15 @@ export default {
uploadFile:{
jsContent1:'È possibile selezionare fino a {maxImg} immagini',
},
isTest:{
available:"Questa funzionalità non è disponibile per gli utenti in prova.",
src:"Questa funzione non è aperta agli utenti in prova, se desideri sottoscrivere, clicca ->",
userName:'Utente in prova',
loginIsTest:"Sei un utente in prova, periodo di prova fino al {date}. Per la sicurezza dei dati degli utenti, non salviamo alcun dato personale caricato dagli utenti in prova e cancelleremo i dati personali dopo ogni disconnessione. Se desideri sottoscrivere, clicca ->",
image:'In quanto utente di prova, puoi caricare solo 10 immagini.'
},
setLabel:{
EditTag:'Modifica tag',
jsContent1:'Si prega di inserire un nome tag',
}
}

View File

@@ -322,4 +322,15 @@ export default {
uploadFile:{
jsContent1:'最大{maxImg}枚の画像を選択できます',
},
isTest:{
available:"この機能はトライアルユーザーには利用できません。",
src:"この機能はトライアルユーザーに開放されていません。サブスクリプションが必要な場合は、をクリックしてください ->",
userName:'トライアルユーザー',
loginIsTest:"あなたはトライアルユーザーです。試用期間は{date}までです。ユーザーデータの安全性のため、トライアルユーザーがアップロードした個人データは保存せず、ログアウト後に個人データは消去されます。サブスクリプションが必要な場合は、をクリックしてください。 ->",
image:'トライアルユーザーであるため、10枚の画像しかアップロードできません。'
},
setLabel:{
EditTag:'タグを編集',
jsContent1:'タグ名を入力してください',
}
}

View File

@@ -322,4 +322,15 @@ export default {
uploadFile:{
jsContent1:'최대 {maxImg}개의 이미지를 선택할 수 있습니다.',
},
isTest:{
available:"이 기능은 체험 사용자에게 제공되지 않습니다。",
src:"이 기능은 체험 사용자에게 열려 있지 않으며, 구독이 필요한 경우,를 클릭하세요. ->",
userName:'체험 사용자',
loginIsTest:"체험 사용자이며, 시험 기간은 {date}까지입니다. 사용자 데이터의 안전을 위해 체험 사용자가 업로드 한 개인 데이터는 저장하지 않으며, 로그 아웃 후 개인 데이터를 지웁니다. 구독이 필요한 경우,를 클릭하세요. ->",
image:'체험 사용자이기 때문에 10개의 이미지만 업로드 할 수 있습니다.'
},
setLabel:{
EditTag:'태그 편집',
jsContent1:'태그 이름을 입력하세요',
}
}

View File

@@ -322,4 +322,15 @@ export default {
uploadFile:{
jsContent1:'Вы можете выбрать до {maxImg} изображений',
},
isTest:{
available:"Эта функция недоступна для пробных пользователей.",
src:"Эта функция не открыта для пробных пользователей, если вам нужна подписка, пожалуйста, нажмите ->",
userName:'Пробный пользователь',
loginIsTest:"Вы являетесь пробным пользователем, испытательный срок до {date}. Для безопасности данных пользователей мы не сохраняем никакие персональные данные, загруженные пробными пользователями, и стираем персональные данные после каждого выхода из системы. Если вам нужна подписка, пожалуйста, нажмите ->",
image:'Поскольку вы являетесь пробным пользователем, вы можете загрузить только 10 изображений.'
},
setLabel:{
EditTag:'Редактировать тег',
jsContent1:'Пожалуйста, введите имя тега',
}
}

View File

@@ -322,4 +322,15 @@ export default {
uploadFile:{
jsContent1:'คุณสามารถเลือกได้สูงสุด {maxImg} ภาพ',
},
isTest:{
available:"เนื่องจากคุณเป็นผู้ใช้ทดลองใช้ คุณไม่สามารถใช้ฟีเจอร์นี้ได้",
src:"ฟังก์ชันนี้ไม่เปิดให้ใช้กับผู้ใช้ทดลอง หากคุณต้องการสมัครสมาชิก กรุณาคลิก ->",
userName:'ผู้ใช้ทดลองใช้',
loginIsTest:"คุณเป็นผู้ใช้ทดลองใช้ ระยะเวลาการทดลองใช้จะสิ้นสุดเมื่อ {date} สำหรับความปลอดภัยของข้อมูลผู้ใช้ เราไม่บันทึกข้อมูลส่วนบุคคลที่ผู้ใช้ทดลองอัปโหลดและจะลบข้อมูลส่วนบุคคลหลังจากทุกครั้งที่ล็อกเอาท์ หากคุณต้องการสมัครสมาชิก กรุณาคลิก ->",
image:'เนื่องจากคุณเป็นผู้ใช้ทดลองใช้ คุณสามารถอัปโหลดรูปภาพได้เพียง 10 ภาพเท่านั้น'
},
setLabel:{
EditTag:'แก้ไขแท็ก',
jsContent1:'โปรดใส่ชื่อแท็ก',
}
}

View File

@@ -322,4 +322,15 @@ export default {
uploadFile:{
jsContent1:'Bạn có thể chọn tối đa {maxImg} hình ảnh',
},
isTest:{
available:"Chức năng này không khả dụng cho người dùng thử nghiệm.",
src:"Chức năng này không mở cho người dùng thử nghiệm, nếu bạn cần đăng ký, hãy nhấp vào ->",
userName:'Người dùng thử nghiệm',
loginIsTest:"Bạn là người dùng thử nghiệm, Thời gian thử nghiệm đến {date}. Vì lý do bảo mật dữ liệu người dùng, chúng tôi không lưu trữ bất kỳ dữ liệu cá nhân nào được tải lên bởi người dùng thử nghiệm và sẽ xóa dữ liệu cá nhân sau mỗi lần đăng xuất. Nếu bạn cần đăng ký, vui lòng nhấp vào ->",
image:'Vì bạn là người dùng thử nghiệm, bạn chỉ có thể tải lên 10 hình ảnh.'
},
setLabel:{
EditTag:'Chỉnh sửa thẻ',
jsContent1:'Vui lòng nhập tên thẻ',
}
}

View File

@@ -3,6 +3,7 @@ import { driver } from "driver.js";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import "driver.js/dist/driver.css";
import { useStore } from "vuex";
import { Https } from "@/tool/https";
//版本一
let driverIndex__ = 0
let store
@@ -14,65 +15,66 @@ let data = {
const driverObj__ = driver({
steps: [
{ element: '.Guide_1_1_1', popover: { title: 'Title', description: 'Description' } },
{ element: '.Guide_1_27', popover: { title: '', description: "You can personalize your design settings right here in the <strong>Workspace</strong>, including choosing to design for men's or women's wear, as well as selecting the mannequin to use for your creations." } },
{ element: '.Guide_1_28', popover: { title: '', description: "Select the apparel type you'd like to work on.", side: "right", } },
{ element: '.Guide_1_28', popover: { title: '', description: 'Change the mannequin here.', side: "right",align: 'end' } },
{ element: '.Guide_1_29', popover: { title: '', description: 'You can currently select a mannequin from our system library. Later, you can also choose from the user library after registering your own mannequin.' } },
// { element: '.Guide_1_27', popover: { title: '', description: "You can personalize your design settings right here in the <strong>Workspace</strong>, including choosing to design for men's or women's wear, as well as selecting the mannequin to use for your creations." } },
// { element: '.Guide_1_28', popover: { title: '', description: "Select the apparel type you'd like to work on.", side: "right", } },
// { element: '.Guide_1_28', popover: { title: '', description: 'Change the mannequin here.', side: "right",align: 'end' } },
// { element: '.Guide_1_29', popover: { title: '', description: 'You can currently select a mannequin from our system library. Later, you can also choose from the user library after registering your own mannequin.' } },
{ element: '.Guide_1_1', popover: { title: '', description: 'Begin your creative journey here. ' } },
{ element: '.Guide_1_1_2', popover: { title: '', description: 'For the Moodboard, Printboard, or Sketchboard, we provide three different sourcing methods to add images. The first option is <strong>Upload</strong>, allowing you to <stront>upload</stront> directly from your local device.', side: "left",align: 'start' } },
{ element: '.Guide_1_1_2', popover: { title: '', description: "The second method is to select from your <strong>Library</strong>. <br> You might notice that your library page is currently empty; there's no need to worry. All the images you upload will be automatically added to your library. In the future, you won't have to upload each time—you can simply choose from your library instead." } },
// { element: '.Guide_1_1_2', popover: { title: '', description: 'Begin your creative journey here. ' } },
// { element: '.Guide_1_3', popover: { title: '', description: 'Description' } },
// { element: '.Guide_1_2', popover: { title: '', description: 'Description' } },
{ element: '.Guide_1_4', popover: { title: '', description: 'The third method is to <strong>Generate</strong> images using the latest Image Generation technology.' } },
{ element: '.Guide_1_5', popover: { title: '', description: "Enter keywords that capture the mood you wish to express and then click the 'Generate' button." } },
{ element: '.Guide_1_6', popover: { title: '', description: 'Select two images for your moodboard.' } },
{ element: '.Guide_1_7', popover: { title: '', description: 'Click here to layout your moodboard.' } },
{ element: '.Guide_1_8', popover: { title: '', description: 'Click here for next step.' } },
//以上moodboard
{ element: '.Guide_1_2_1', popover: { title: '', description: 'Click here to generate print images.' } },
{ element: '.Guide_1_2_2', popover: { title: '', description: 'We provide three input options for generating images: Image Only, Text Only, and Text-Image.' } },
{ element: '.Guide_1_2_3', popover: { title: '', description: 'Select this option and we will generate four print images using both the picture you upload and the text you enter.' } },
{ element: '.Guide_1_2_4', popover: { title: '', description: 'Choose a generation model here; different models will generate images in various styles.' } },
{ element: '.Guide_1_2_5', popover: { title: '', description: 'Choose a generation model here; different models will generate images in various styles.' } },
{ element: '.Guide_1_2_6', popover: { title: '', description: 'Upload the input picture here.' } },
{ element: '.Guide_1_2_7', popover: { title: '', description: "Click on this image to select it." } },
{ element: '.Guide_1_2_8', popover: { title: '', description: "Enter keywords about the print you wish to create and then click the 'Generate' button." } },
{ element: '.Guide_1_2_9', popover: { title: '', description: 'Select the generated prints you like best.' } },
{ element: '.Guide_1_8', popover: { title: '', description: 'Click here for next step.' } },
{ element: '.Guide_1_10', popover: { title: '', description: 'Click here to extract primary colors from image.' } },
{ element: '.Guide_1_11', popover: { title: '', description: 'Select the color you want from these color blocks as the first color.' } },
// { element: '.Guide_1_1', popover: { title: '', description: 'Begin your creative journey here. ' } },
// { element: '.Guide_1_1_2', popover: { title: '', description: 'For the Moodboard, Printboard, or Sketchboard, we provide three different sourcing methods to add images. The first option is <strong>Upload</strong>, allowing you to <stront>upload</stront> directly from your local device.', side: "left",align: 'start' } },
// { element: '.Guide_1_1_2', popover: { title: '', description: "The second method is to select from your <strong>Library</strong>. <br> You might notice that your library page is currently empty; there's no need to worry. All the images you upload will be automatically added to your library. In the future, you won't have to upload each time—you can simply choose from your library instead." } },
// // { element: '.Guide_1_1_2', popover: { title: '', description: 'Begin your creative journey here. ' } },
// // { element: '.Guide_1_3', popover: { title: '', description: 'Description' } },
// // { element: '.Guide_1_2', popover: { title: '', description: 'Description' } },
// { element: '.Guide_1_4', popover: { title: '', description: 'The third method is to <strong>Generate</strong> images using the latest Image Generation technology.' } },
// { element: '.Guide_1_5', popover: { title: '', description: "Enter keywords that capture the mood you wish to express and then click the 'Generate' button." } },
// { element: '.Guide_1_6', popover: { title: '', description: 'Select two images for your moodboard.' } },
// { element: '.Guide_1_7', popover: { title: '', description: 'Click here to layout your moodboard.' } },
// { element: '.Guide_1_8', popover: { title: '', description: 'Click here for next step.' } },
// //以上moodboard
// { element: '.Guide_1_2_1', popover: { title: '', description: 'Click here to generate print images.' } },
// { element: '.Guide_1_2_2', popover: { title: '', description: 'We provide three input options for generating images: Image Only, Text Only, and Text-Image.' } },
// { element: '.Guide_1_2_3', popover: { title: '', description: 'Select this option and we will generate four print images using both the picture you upload and the text you enter.' } },
// { element: '.Guide_1_2_4', popover: { title: '', description: 'Choose a generation model here; different models will generate images in various styles.' } },
// { element: '.Guide_1_2_5', popover: { title: '', description: 'Choose a generation model here; different models will generate images in various styles.' } },
// { element: '.Guide_1_2_6', popover: { title: '', description: 'Upload the input picture here.' } },
// { element: '.Guide_1_2_7', popover: { title: '', description: "Click on this image to select it." } },
// { element: '.Guide_1_2_8', popover: { title: '', description: "Enter keywords about the print you wish to create and then click the 'Generate' button." } },
// { element: '.Guide_1_2_9', popover: { title: '', description: 'Select the generated prints you like best.' } },
// { element: '.Guide_1_8', popover: { title: '', description: 'Click here for next step.' } },
// { element: '.Guide_1_10', popover: { title: '', description: 'Click here to extract primary colors from image.' } },
// { element: '.Guide_1_11', popover: { title: '', description: 'Select the color you want from these color blocks as the first color.' } },
{ element: '.Guide_1_11_1', popover: { title: '', description: 'Click on this block to select the second color.' } },
{ element: '.Guide_1_11_2', popover: { title: '', description: 'Choose the color you want from these color blocks.' } },
// { element: '.Guide_1_11_1', popover: { title: '', description: 'Click on this block to select the second color.' } },
// { element: '.Guide_1_11_2', popover: { title: '', description: 'Choose the color you want from these color blocks.' } },
{ element: '.Guide_1_8', popover: { title: '', description: 'Click here for next step.' } },
{ element: '.Guide_1_9', popover: { title: '', description: 'Click here to generate clothing sketches.' } },
{ element: '.Guide_1_9_1', popover: { title: '', description: 'Using text only option for generation.' } },
{ element: '.Guide_1_9_2', popover: { title: '', description: "Enter keywords about the sketch you wish to create and then click the 'Generate' button." } },
// { element: '.Guide_1_8', popover: { title: '', description: 'Click here for next step.' } },
// { element: '.Guide_1_9', popover: { title: '', description: 'Click here to generate clothing sketches.' } },
// { element: '.Guide_1_9_1', popover: { title: '', description: 'Using text only option for generation.' } },
// { element: '.Guide_1_9_2', popover: { title: '', description: "Enter keywords about the sketch you wish to create and then click the 'Generate' button." } },
{ element: '.Guide_1_13', popover: { title: '', description: 'Click here to choose a category for the generated sketch.' } },
{ element: '.Guide_1_13_1', popover: { title: '', description: 'Choose correct category for the sketch.' } },
{ element: '.Guide_1_13_2', popover: { title: '', description: 'Select the generated sketches you like best.' } },
{ element: '.Guide_1_14', popover: { title: '', description: 'Cick here to complete the uploading process.' } },
//开始design
{ element: '.Guide_1_15', popover: { title: '', description: 'Click here to let AI generate design illustrations.' } },
{ element: '.Guide_1_16', popover: { title: '', description: 'Please wait a few seconds.' } },
{ element: '.Guide_1_17', popover: { title: '', description: 'Click the little red heart to save your favorite design.' } },
// { element: '.Guide_1_18', popover: { title: '', description: 'Description' } },
{ element: '.Guide_1_30', popover: { title: '', description: "Click '<strong>Redesign</strong>' to generate eight new outfits for your collection to choose from." } },
{ element: '.Guide_1_16_1', popover: { title: '', description: 'Click here to let AI generate design illustrations.' } },
{ element: '.Guide_1_17', popover: { title: '', description: 'Click on any design image you are interested in to modify the details.' } },
{ element: '.Guide_1_19', popover: { title: '', description: 'Click on the clothes to modify its details.' } },
{ element: '.Guide_1_20', popover: { title: '', description: 'Click here to add or change the print.' } },
{ element: '.Guide_1_21', popover: { title: '', description: 'You can find the print you uploaded earlier in your Library.' } },
{ element: '.Guide_1_22', popover: { title: '', description: 'Select a print for this sketch.' } },
{ element: '.Guide_1_23', popover: { title: '', description: 'Click here to layout the selected print' } },
// { element: '.Guide_1_24', popover: { title: '', description: 'Description' } },
{ element: '.Guide_1_25', popover: { title: '', description: 'Preview printed design here.' ,side: "right",align: 'end' } },
{ element: '.Guide_1_26', popover: { title: '', description: 'Click here to finalize your modification.' } },
// { element: '.Guide_1_13', popover: { title: '', description: 'Click here to choose a category for the generated sketch.' } },
// { element: '.Guide_1_13_1', popover: { title: '', description: 'Choose correct category for the sketch.' } },
// { element: '.Guide_1_13_2', popover: { title: '', description: 'Select the generated sketches you like best.' } },
// { element: '.Guide_1_14', popover: { title: '', description: 'Cick here to complete the uploading process.' } },
// //开始design
// { element: '.Guide_1_15', popover: { title: '', description: 'Click here to let AI generate design illustrations.' } },
// { element: '.Guide_1_16', popover: { title: '', description: 'Please wait a few seconds.' } },
// { element: '.Guide_1_17', popover: { title: '', description: 'Click the little red heart to save your favorite design.' } },
// // { element: '.Guide_1_18', popover: { title: '', description: 'Description' } },
// { element: '.Guide_1_30', popover: { title: '', description: "Click '<strong>Redesign</strong>' to generate eight new outfits for your collection to choose from." } },
// { element: '.Guide_1_16_1', popover: { title: '', description: 'Click here to let AI generate design illustrations.' } },
// { element: '.Guide_1_17', popover: { title: '', description: 'Click on any design image you are interested in to modify the details.' } },
// { element: '.Guide_1_19', popover: { title: '', description: 'Click on the clothes to modify its details.' } },
// { element: '.Guide_1_20', popover: { title: '', description: 'Click here to add or change the print.' } },
// { element: '.Guide_1_21', popover: { title: '', description: 'You can find the print you uploaded earlier in your Library.' } },
// { element: '.Guide_1_22', popover: { title: '', description: 'Select a print for this sketch.' } },
// { element: '.Guide_1_23', popover: { title: '', description: 'Click here to layout the selected print' } },
// // { element: '.Guide_1_24', popover: { title: '', description: 'Description' } },
// { element: '.Guide_1_25', popover: { title: '', description: 'Preview printed design here.' ,side: "right",align: 'end' } },
// { element: '.Guide_1_26', popover: { title: '', description: 'Click here to finalize your modification.' } },
// { element: '.Guide_1_31', popover: { title: '', description: 'Click here to export the collection you just designed.' } },
{ element: '.Guide_1_99', popover: { title: 'Begin Your Design', description: 'Your guide is complete, and now the canvas is yours to create freely. For more insights and details, check out our demo video on the homepage at <a href="https://code-create.com.hk/aida/" style="pointer-events: auto;" target="_blank">https://code-create.com.hk/aida/</a><br>You can restart the tutorial at any time by simply telling the robot that you want to.' } },
],
// showProgress: true,//控制总页数和当前页数是否显示
@@ -88,7 +90,7 @@ const driverObj__ = driver({
// prevBtnText: '‹—',
doneBtnText: '✕',
onPopoverRender: (popover, options) => {//每个步骤的元素和所有信息
console.log(popover,options,element);
// console.log(popover,options,element);
popover.previousButton.style.display = 'none'
// let driver = document.querySelector('body')
driverIndex__ = driverObj__.getState().activeIndex
@@ -156,6 +158,10 @@ const driverObj__ = driver({
store?.commit("setGuide", data);
setCookie("isBeginner", false);
driverObj__.destroy();//销毁方法
let data_ = {}
Https.axiosPost(Https.httpUrls.completeGuidancet, data_).then(
).catch(res=>{
});
},
//销毁前
onDestroyed:()=>{
@@ -198,7 +204,8 @@ function removeDiv(element){
const openGuide = () =>{
let isBeginner = JSON.parse(getCookie('isBeginner'))
let isBeginnerNum = JSON.parse(getCookie('isBeginnerNum'))
// console.log(isBeginner);
let isBeginnerNum = JSON.parse(getCookie('isBeginnerNum')?getCookie('isBeginnerNum'):'0')
let data
// console.log(isBeginner);
if(isBeginner){

View File

@@ -99,7 +99,8 @@ export const Https = {
changeUserLanguage:`/api/account/changeUserLanguage`, //账号密码登录接口
trialUserLogout:`/account/trialUserLogout`, //试用用户退出登录接口
completeGuidancet:`/api/account/completeGuidance`, //用户指引结束
preLogin:'/api/account/preLogin',//预先登入
accountSendEmail:`/api/account/sendEmail`, //发送邮件
accountResetPwd:'/api/account/resetPwd', //忘记密码修改

View File

@@ -107,7 +107,7 @@
<i class="fi fi-rs-comments"></i><span class="content_header_des">{{ $t('HomeView.SelectedDesign') }}</span>
</div>
<div class="right_content_export" v-show="likeDesignCollectionList.length">
<div class="button_second" @click="exportCanvas()">
<div class="button_second Guide_1_31" @click="exportCanvas()">
{{ $t('HomeView.Export') }}
</div>
<div
@@ -421,11 +421,8 @@ export default defineComponent({
let collectionModal: any = this.$refs.collectionModal;
this.store.commit("clearAllData");
collectionModal.changeCollectionModal(true);
console.log(this.driver__.driver);
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
@@ -902,6 +899,11 @@ export default defineComponent({
let rightContentImgBlock: any = document.querySelector(
"#right_content_img_block"
);
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
let a = document.createElement("a");
this.isShowMark = true;
let img:any = []
@@ -941,6 +943,21 @@ export default defineComponent({
num++
}
}
this.likeDesignCollectionList.forEach((item:any)=>{
let nameTail = item?.designOutfitUrl?.split(".").pop().split("?").shift();
let data = {
imgUrl: item.designOutfitUrl,
name:
'result' +
index +
"." +
nameTail,
};
img.push(data);
index++;
})
// a.setAttribute('href', URL.createObjectURL(blob));
// a.setAttribute('download', `collection.png`);
// a.click();
@@ -968,8 +985,10 @@ export default defineComponent({
// });
// }
// );
this.downImg(img);
// console.log(img);
return
this.downImg(img);
},
//打开图片详情

View File

@@ -536,6 +536,11 @@ export default defineComponent({
token: "",
};
},
watch:{
sex(newVal,oldVal){
this.upload.gender = newVal.value
},
},
async mounted(){
let userInfo:any = getCookie("userInfo")
let isTest:any = getCookie('isTest')
@@ -632,6 +637,7 @@ export default defineComponent({
// this.designType = 'Outwear',
this.selectImgList = []
this.selectSingleImg = {}
this.value.labelValue = []
this.getLibraryList()
this.getClass()
this.uploadGenerate = 'Upload'
@@ -1056,13 +1062,22 @@ export default defineComponent({
},
generateFileUploadChange(data:any){
let file = data.file;
let bor = true
if (file.status === "done") {
let res = JSON.parse(file.xhr.response);
file.id = res.data.id;
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = "upload";
let res:any = JSON.parse(file.xhr.response);
if(res.errCode == 0){
file.id = res.data.id;
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = "upload";
}else{
bor = false
}
} else if (file.status === "error") {
bor = false
}
if(!bor){
let res:any = JSON.parse(file.xhr.response);
let index = -1;
this.selectGenerateList.forEach((ele: any, index1: any) => {
if (file.uid === ele.uid) {
@@ -1072,8 +1087,9 @@ export default defineComponent({
if (index > -1) {
this.selectGenerateList.splice(index, 1);
}
message.warning(file.name + this.t('LibraryPage.jsContent8'));
}
// message.warning(file.name + this.t('LibraryPage.jsContent8'));
message.warning(res.errMsg);
}
},
deleteFile(index: any) {
this.selectGenerateList.splice(index, 1);
@@ -1134,7 +1150,7 @@ export default defineComponent({
}
if(generateType == 'image'||generateType == 'text-image'){
if(generageImg?.id){
data.text = ''
}else{
message.warning(
this.t('LibraryPage.jsContent9')

View File

@@ -455,6 +455,7 @@ export default defineComponent({
setCookie("token", token);
setCookie("isTest", isTest);
setCookie("isBeginner", isBeginner);
setCookie("isBeginnerNum", 0);
setCookie("userInfo", JSON.stringify(rv));
this.turnToHomePage();
}