2023-11-10-dist

This commit is contained in:
X1627315083
2023-11-10 10:56:18 +08:00
parent 223984c10b
commit 1298a3051e
20 changed files with 175 additions and 63 deletions

File diff suppressed because one or more lines are too long

1
dist/css/355.e65c803c.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/css/635.cf0d9543.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/index.html vendored
View File

@@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>AiDA</title><link rel="stylesheet" href="./css/googleapis.css"><link rel="stylesheet" href="./css/roboto.css"><script defer="defer" src="/js/chunk-vendors.ac33c5f3.js"></script><script defer="defer" src="/js/app.fa17852b.js"></script><link href="/css/chunk-vendors.5e9dbdc9.css" rel="stylesheet"><link href="/css/app.813ecc8b.css" rel="stylesheet"></head><body><script src="./js/color-thief.js"></script><noscript><strong>We're sorry but aida doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>AiDA</title><link rel="stylesheet" href="./css/googleapis.css"><link rel="stylesheet" href="./css/roboto.css"><script defer="defer" src="/js/chunk-vendors.ac33c5f3.js"></script><script defer="defer" src="/js/app.0e4c2667.js"></script><link href="/css/chunk-vendors.5e9dbdc9.css" rel="stylesheet"><link href="/css/app.813ecc8b.css" rel="stylesheet"></head><body><script src="./js/color-thief.js"></script><noscript><strong>We're sorry but aida doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/js/355.17345da4.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -385,13 +385,14 @@ export default defineComponent({
let width = imgDomWH.width
let height = imgDomWH.height
let num = width/height
let num1 = height/width
let w,h
//判断移动四个边
if(this.direction == 'right'){
w = (e.x - this.printStyleList[this.imgDomIndex].centers.left)
h = (e.x - this.printStyleList[this.imgDomIndex].centers.left)*num
width = w+'px'
height = w*num+'px'
height = w*num1+'px'
}else if(this.direction == 'top'){
this.printStyleList[this.imgDomIndex].style.top = 'auto'
// this.printStyleList[this.imgDomIndex].style.left = 'auto'
@@ -410,7 +411,7 @@ export default defineComponent({
this.printStyleList[this.imgDomIndex].style.right = parentNode.offsetWidth -imgDomWH.width - this.imgDom.offsetLeft+'px'
w = (this.printStyleList[this.imgDomIndex].centers.left - e.x)
width = w+'px'
height = w*num+'px'
height = w*num1+'px'
}
//判断尺寸是否到边
this.printStyleList[this.imgDomIndex].style.width = width
@@ -487,7 +488,12 @@ export default defineComponent({
let rotateZ2 = Math.trunc(Math.random()*360)+1
let sketch = document.getElementsByClassName("designOpenrtion_modal")[0]?.getElementsByClassName('designOpenrtion_sketch')[0]
let width = Math.trunc(Math.random()*(sketch?.width-sketch?.width/3))+1+sketch?.width/3
let scale = width / this.print.width.replace(/px/g,'')
let scale
if(this.print.width - this.print.height > 0 || this.print.width - this.print.height == 0){
scale = width / this.print.width.replace(/px/g,'')
}else{
scale = width / this.print.width.replace(/px/g,'')
}
// let x = sketch.width-Number(this.print.width.replace(/px/g,''))
// let y = sketch.height-Number(this.print.height.replace(/px/g,''))
let x = sketch?.width-this.print.width.replace(/px/g,'')*scale

View File

@@ -36,6 +36,7 @@
<ul v-show="printModel.optype">
<li class="printModel_item" @click="setprintModel(1)">{{ $t('Generate.Model1') }}</li>
<li class="printModel_item" @click="setprintModel(2)">{{ $t('Generate.Model2') }}</li>
<li v-show="printBoards.length > 1" class="printModel_item" @click="setprintModel(3)">{{ $t('Generate.Generate') }}</li>
</ul>
</div>
</div>
@@ -232,10 +233,11 @@ export default defineComponent({
let collectionElementid = ref()
let level2Type = ref('')
let printModel = ref({
num:1,
num:'',
optype:false,
name:useI18n().t('Generate.Model')+'1'
})
let printBoards:any = computed(()=>{return store.state.UploadFilesModule.printboard})
// let sketchCatecoryList:any = ref([])
let workspace:any = ref({})
@@ -265,6 +267,7 @@ export default defineComponent({
checkboxImage,
printModel,
loadingShow,
printBoards,
// sketchCatecoryList,
workspace,
inputShow,
@@ -371,11 +374,20 @@ export default defineComponent({
document.removeEventListener('click',this.removePrintModel)
},
setprintModel(num:any){
this.printModel = {
num : num,
optype:false,
name:this.t('Generate.Model')+num
if(num == 3){
this.printModel = {
num : this.t('Generate.Generate'),
optype:false,
name:this.t('Generate.Generate')
}
}else{
this.printModel = {
num : num,
optype:false,
name:this.t('Generate.Model')+num
}
}
},
getgenerate(){
if(!this.searchPictureName){

View File

@@ -375,26 +375,26 @@ export default defineComponent({
//获取当前语言
getLang(){
let data = {}
Https.axiosPost(Https.httpUrls.getUserLanguage, data).then(
(rv) => {
if (rv) {
this.locale = rv
}
}
);
// Https.axiosPost(Https.httpUrls.getUserLanguage, data).then(
// (rv) => {
// if (rv) {
// this.locale = rv
// }
// }
// );
},
setLang(v){
let data = {
language:v
}
Https.axiosPost(Https.httpUrls.changeUserLanguage, data).then(
(rv) => {
if (rv) {
console.log(rv);
// this.getLang()
}
}
);
// Https.axiosPost(Https.httpUrls.changeUserLanguage, data).then(
// (rv) => {
// if (rv) {
// console.log(rv);
// this.getLang()
// }
// }
// );
},
setLocale(v){
@@ -402,7 +402,7 @@ export default defineComponent({
// let name = 'home'
// let noRefresh = true;
// this.$router.push({ name: name, params: { noRefresh: noRefresh } });
this.locale = v
// this.locale = v
this.setLang(v)
// this.locale == 'zh-cn'?this.locale = 'en':this.locale = 'zh-cn'
}

View File

@@ -155,7 +155,8 @@ export default defineComponent({
let store:any =useStore()
let fileList:any = ref([]),//选中的文件id数据
printImgList:any = ref([]), //print的印花图片
moodBoards:any = computed(()=>{return store.state.UploadFilesModule.moodboardFiles})
moodBoards:any = computed(()=>{return store.state.UploadFilesModule.moodboard}),
printBoards:any = computed(()=>{return store.state.UploadFilesModule.printboard})
let openClick: any = ref(1);
let generateCheckbox:any = ref()
let generateList:any = ref([])
@@ -167,6 +168,7 @@ export default defineComponent({
fileList,
printImgList,
moodBoards,
printBoards,
openClick,
generateCheckbox,
generateList,
@@ -179,7 +181,7 @@ export default defineComponent({
computed:{
getPinLength(){
let selectLength:any = 0
for(let item of this.fileList){
for(let item of this.printBoards){
if(item.pin){
selectLength++
}
@@ -208,7 +210,6 @@ export default defineComponent({
cropperFileData:{name:'',uid:''}, //裁剪的原始文件数据
currentFileNum:0, //当前上传的文件数
isUpload:false,
generateloading:false,
captionGeneration:'',
printboardList:computed(()=>{
return useStore().state.UploadFilesModule.printboard
@@ -499,8 +500,13 @@ export default defineComponent({
},500)
},
getgenerate(){
//如果是通过moodboard随即图片生成
let generage:any = this.$refs.Generate
let generateType = generage.checkbox.filter((v:any)=>v.type)[0].name
if(generage.printModel.num == 'Generate'){
this.generatePrint()
return
}
let data = {
generateType:generateType,
designType:'',
@@ -541,29 +547,115 @@ export default defineComponent({
return
}
}
this.loadingShow = true
Https.axiosPost(Https.httpUrls.sketchAndPrintGenerate, data).then(
(rv) => {
if(rv){
this.generateList = []
let arr
rv.generatedCollectionItems.forEach((v:any,index:number)=>{
arr = {
id:v.generateItemId,
imgUrl:v.generateItemUrl,
id_:GO.id++,
like:rv.generatedCollectionItems[index].isLiked
// this.loadingShow = true
// Https.axiosPost(Https.httpUrls.sketchAndPrintGenerate, data).then(
// (rv) => {
// if(rv){
// this.generateList = []
// let arr
// rv.generatedCollectionItems.forEach((v:any,index:number)=>{
// arr = {
// id:v.generateItemId,
// imgUrl:v.generateItemUrl,
// id_:GO.id++,
// like:rv.generatedCollectionItems[index].isLiked
}
this.generateList.push(arr)
this.loadingShow = false
})
}
}
).catch(res=>{
this.loadingShow = false
});
// }
// this.generateList.push(arr)
// this.loadingShow = false
// })
// }
// }
// ).catch(res=>{
// this.loadingShow = false
// });
},
randomRange(min:any, max:any, num:any) { // min最小值max最大值 num排除的值
let index = Math.floor(Math.random() * (max - min)) + min;
while(index === num){
index = Math.floor(Math.random() * (max - min)) + min;
}
return index
},
generatePrint(){
let data:any = {}
//随机获取图片id
if(!this.moodBoards.length){ //mood没有图片
let index1 = -1
let index2 = -2
if(!this.getPinLength){ //没pin住
index1 = this.randomRange(0, this.printBoards.length, -1)
index2 = this.randomRange(0, this.printBoards.length, index1)
}else if(this.getPinLength === 1){ //pin住1个
this.printBoards.forEach((element:any,index:number) => {
if(element.pin){
index1 = index
}
});
index2 = this.randomRange(0, this.printBoards.length, index1)
}else{ //pin住多个
let selectIndexList:any = []
this.printBoards.forEach((element:any,index:number) => {
if(element.pin){
selectIndexList.push(index)
}
});
index1 = this.randomRange(0, selectIndexList.length, -1) //pin住的中随机选一个
index2 = this.randomRange(0, this.printBoards.length, selectIndexList[index1]) //除了选中的外再来一个
}
data = {
select1Id:this.printBoards[index1].id,
select2Id:this.printBoards[index2].id
}
}else{
let index1 = this.randomRange(0, this.moodBoards.length, -1)
let index2 = -2
if(!this.getPinLength){ //没pin住
index2 = this.randomRange(0, this.printBoards.length, -1)
}else if(this.getPinLength === 1){ //pin住1个
this.printBoards.forEach((element:any,index:number) => {
if(element.pin){
index2 = index
}
});
}else{ //pin住多个
let selectIndexList:any = []
this.printBoards.forEach((element:any,index:number) => {
if(element.pin){
selectIndexList.push(index)
}
});
index2 = this.randomRange(0, selectIndexList.length, -1) //pin住的中随机选一个
}
data = {
select1Id:this.moodBoards[index1].resData.id,
select2Id:this.printBoards[index2].id
}
}
data.timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone,
console.log(data,this.moodBoards,this.printBoards);
this.loadingShow = true
Https.axiosPost(Https.httpUrls.elementGeneratePrint, data).then((rv) =>{
if(rv){
console.log(rv);
// let data = {
// imgUrl:rv.url,
// resData:rv
// }
// this.printImgList.push(data)
// this.store.commit('setGeneratePrintFile',this.printImgList)
// this.loadingShow = false
}
}).catch(res=>{
this.loadingShow = false
})
},
generageAdd(item:any){
item.type_ = {
type1: "generate",

View File

@@ -299,6 +299,8 @@ export default defineComponent({
max-height: 65rem;
overflow-y: auto;
// border-radius: ;
&.setLabel_centent::-webkit-scrollbar{display: none;}
&.active{
overflow: hidden;
}