This commit is contained in:
X1627315083
2023-12-04 11:48:17 +08:00
parent c2399fd4e4
commit bcb6483ce0
25 changed files with 148 additions and 81 deletions

File diff suppressed because one or more lines are too long

1
dist/css/186.e306a42b.css vendored Normal file

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.9c1ca004.js"></script><script defer="defer" src="/js/app.c4ad0ea2.js"></script><link href="/css/chunk-vendors.5e9dbdc9.css" rel="stylesheet"><link href="/css/app.2dce6a51.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.9c1ca004.js"></script><script defer="defer" src="/js/app.d0ecdfe2.js"></script><link href="/css/chunk-vendors.5e9dbdc9.css" rel="stylesheet"><link href="/css/app.2dce6a51.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/app.d0ecdfe2.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -39,7 +39,7 @@
</div>
<div class="print_right show_print_right Guide_1_25" :class="[driver__.driver?'showEvents':'']">
<div v-show="!overallSingle" class="habit_System_Designer">
<div class="habit_System_Designer_text">Scale</div>
<div class="habit_System_Designer_text">{{ $t('DesignPrintOperation.Scale') }}</div>
<a-slider id="system_silder"
v-model:value="systemDesignerPercentage"
@afterChange="systemDesigner"
@@ -663,7 +663,6 @@ export default defineComponent({
// this.closeModal()
if(this.driver__.driver){
nextTick().then(()=>{
console.log(21321);
driverObj__.moveNext();
})
}

View File

@@ -3,6 +3,7 @@
<a-modal
class="designOpenrtion_modal"
v-model:visible="designOpenrtion"
:class="[driver__.driver?'hideEvents':'']"
:footer="null"
width="65%"
:maskClosable="false"
@@ -36,7 +37,7 @@
{{ $t('DesignPrintOperation.Single') }}
</div>
</div>
<div class="print_right show_print_right Guide_1_25" :class="[driver__.driver?'showEvents':'']">
<div class="print_right show_print_right Guide_1_25" :class="[driver__?.driver?'showEvents':'']">
<div v-show="!overallSingle" class="habit_System_Designer">
<div class="habit_System_Designer_text">Scale</div>
<a-slider id="system_silder"
@@ -117,6 +118,7 @@ export default defineComponent({
setup(prop) {
let designOpenrtion = ref(false);
let designOpenrtionList = ref([])
let driver__ = inject('driver__')
let current = inject('current')//父组件传过来的数据
let setRevocation = inject('setRevocation')//父组件传过来的数据
let overallSingle = ref(false)
@@ -175,6 +177,7 @@ export default defineComponent({
loadingShow,
setRevocation,
t,
driver__,
};
},
data() {
@@ -253,8 +256,6 @@ export default defineComponent({
let print = new Image
print.src = this.current.printObject.prints[0].path
print.onload=()=>{
let sketch = document.getElementsByClassName("designOpenrtion_modal")[0]?.getElementsByClassName('designOpenrtion_sketch')[0]
let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
this.print.width = print.width+'px'
this.print.height = print.height+'px'
this.printStyleList[0].style.width = print.width+'px'
@@ -658,7 +659,7 @@ export default defineComponent({
this.loadingShow = false
this.designOpenrtion = false
// this.closeModal()
if(this.driver__.driver){
if(this.driver__?.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
@@ -1003,8 +1004,9 @@ export default defineComponent({
li{
cursor: pointer;
// border-radius: 50%;
width: 1rem;
height: 1rem;
width: 1.5rem;
height: 1.5rem;
padding: 1rem;
background-color: rgb(20, 188, 255);
position: absolute;
pointer-events: none;
@@ -1049,7 +1051,7 @@ export default defineComponent({
content: "";
background-color: #14bcff;
width: .2rem;
height: 3rem;
height: 4rem;
left: 50%;
bottom: 0;
transform: translateX(-50%);
@@ -1063,6 +1065,7 @@ export default defineComponent({
transform: translate(-50%,-50%) ;
width: 1.5rem;
height: 1.5rem;
padding: 1;
border-radius: 50%;
}
}

View File

@@ -492,11 +492,13 @@ export default defineComponent({
li{
cursor: pointer;
// border-radius: 50%;
width: 1rem;
height: 1rem;
width: 1.5rem;
height: 1.5rem;
padding: 1rem;
background-color: rgb(20, 188, 255);
position: absolute;
pointer-events: none;
z-index: 2;
}
&.active{
opacity: 1;

View File

@@ -79,7 +79,9 @@ import { useStore } from "vuex";
export default defineComponent({
components:{MoodTemplate},
setup() {
let sketch:any = ref([[],[],[]])
let sketch:any = computed(()=>{
return store.state.HomeStoreModule.showSketchList})
// let sketch:any = ref([[],[],[]])
let sketchList:any = computed(()=>{
return store.state.UploadFilesModule.showSketchboard})
const store = useStore();
@@ -97,10 +99,7 @@ export default defineComponent({
watch: {
sketchList:{
handler(newVal:any,oldVal:any){
// this.sketchList = []
// this.sketch = [[],[],[]]
// this.sketchList = this.allBoardData.sketchboardFiles
this.setSketch()
// this.setSketch()
},
immediate: true
},
@@ -130,11 +129,13 @@ export default defineComponent({
sketch1.num = 0
sketch2.num = 1
sketch3.num = 2
let aaa = JSON.parse(JSON.stringify(this.sketchList))
if(this.sketchList){
for (let i = 0; i < this.sketchList.length; i++) {
for (let i = 0; i < aaa.length; i++) {
let arr = [sketch1,sketch2,sketch3]
let image = new Image()
image.src = this.sketchList[i].urlWithWhiteSide
image.src = aaa[i].urlWithWhiteSide
arr.sort((a,b)=>{
var a_num = a["height"];
@@ -142,7 +143,7 @@ export default defineComponent({
return a_num - b_num;
})
// console.log(arr);
this.sketch[arr[0].num]?.push(this.sketchList[i])
this.sketch[arr[0].num]?.push(aaa[i])
// console.log([sketch1.height,sketch2.height,sketch3.height]);
await new Promise((resolve:any)=>{
image.onload = ()=>{
@@ -150,7 +151,6 @@ export default defineComponent({
sketch1 = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item0')[0]?.getBoundingClientRect()
sketch2 = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item1')[0]?.getBoundingClientRect()
sketch3 = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item2')[0]?.getBoundingClientRect()
sketch1.num = 0
sketch2.num = 1
sketch3.num = 2
@@ -161,7 +161,6 @@ export default defineComponent({
})
}
}
})
}
}
@@ -281,6 +280,9 @@ export default defineComponent({
height: auto;
>div{
margin-bottom: 2rem;
img{
width: 100%;
}
}
}
>div:nth-child(1){

View File

@@ -460,7 +460,6 @@ export default defineComponent({
return
}
}
if(this.moodb_[arr.length-1].length == 2){
this.moodb_className = this.moodb_[arr.length-1][0]
}else{
@@ -472,8 +471,6 @@ export default defineComponent({
this.layoutList.forEach((v:any)=>{
v.setPitch = false
})
nextTick().then(async ()=>{
let layoutCentent = document.getElementById('modal_img')
let file = await domTurnImg(layoutCentent)
@@ -498,8 +495,6 @@ export default defineComponent({
driverObj__.moveNext()
}
})
},
setmoodbClass(val:any){
this.moodb_className = val

View File

@@ -119,19 +119,19 @@ export default defineComponent({
sketch1.num = 0
sketch2.num = 1
sketch3.num = 2
let aaa = JSON.parse(JSON.stringify(this.sketchList))
if(this.sketchList){
for (let i = 0; i < this.sketchList.length; i++) {
for (let i = 0; i < aaa.length; i++) {
let arr = [sketch1,sketch2,sketch3]
let image = new Image()
image.src = this.sketchList[i].urlWithWhiteSide
image.src = aaa[i].urlWithWhiteSide
arr.sort((a,b)=>{
var a_num = a["height"];
var b_num = b["height"];
return a_num - b_num;
})
// console.log(arr);
this.sketch[arr[0].num]?.push(this.sketchList[i])
this.sketch[arr[0].num]?.push(aaa[i])
// console.log([sketch1.height,sketch2.height,sketch3.height]);
await new Promise((resolve:any)=>{
image.onload = ()=>{
@@ -149,6 +149,7 @@ export default defineComponent({
})
}
this.store.commit('setshowSketchList', this.sketch)
}
})
}
@@ -275,6 +276,9 @@ export default defineComponent({
height: auto;
>div{
margin-bottom: 2rem;
img{
width: 100%;
}
}
}
>div:nth-child(1){

View File

@@ -28,7 +28,10 @@
</div>
<div class="layout_centent" :class="{active:flex_direction}" id="layoutCentent">
<div v-for="item,index in layoutList" :key="item" :class="moodbClassName[index]" class="modal_imgItem" v-layout="index" @click="setpitch(item,index)" ref="content" >
<img crossOrigin="anonymous" :src="item.imgUrl" draggable="false" v-modelImg>
<img crossOrigin="anonymous" :src="item.imgUrl" draggable="false" :class="moodbClassName[index]" v-modelImg>
<div>
</div>
<ul v-show="item.setPitch" class="layout_btn" >
<li class="layout_btn_top" v-compile.stop="'top'"></li>
<li class="layout_btn_bottom" v-compile.stop="'bottom'"></li>
@@ -745,8 +748,8 @@ export default defineComponent({
li{
cursor: pointer;
// border-radius: 50%;
width: 1rem;
height: 1rem;
width: 1.5rem;
height: 1.5rem;
background-color: rgb(20, 188, 255);
position: absolute;
z-index: 1049;

View File

@@ -68,6 +68,12 @@
</div>
</div>
</div>
<div class="layout_right">
<div class="layout_right_text">
{{ $t('DesignPrintOperation.Scale') }}
</div>
<input type="text">
</div>
<!-- <div class="layout_right">
<div v-for="item,index in moodbList" class="layout_left_items" @click="setmoodb(item)">
<div v-for="clasitem,clasindex in item" :class="clasitem" class="layout_left_item">
@@ -488,22 +494,23 @@ export default defineComponent({
//移动图片
translate:{
mounted (el,layout:any,binding) {
el.addEventListener('mousedown',(e: MouseEvent)=>{
el.addEventListener('touchstart',(e:any)=>{
e.stopPropagation()
let elParent = el.parentNode.parentNode
el.style.left = (el.offsetLeft+2)/(elParent.offsetWidth)*100+'%'
el.style.top = (el.offsetTop+2)/(elParent.offsetHeight)*100+'%'
let left = el.style.left? el.style.left.replace(/%/g,'') : 0
let top = el.style.top? el.style.top.replace(/%/g,'') : 0
let mouseX = e.offsetX //鼠标点击位置到domleft距离
let mouseY = e.offsetY
let domX = e.clientX - e.offsetX - el.offsetLeft//鼠标到最左侧距离减去鼠标到dom距离再减去已经有的left值
let domY = e.clientY - e.offsetY - el.offsetTop
let mouseX = e.changedTouches[0].pageX - el.parentNode.getBoundingClientRect().left //鼠标点击位置到domleft距离
let mouseY = e.changedTouches[0].pageY - el.parentNode.getBoundingClientRect().top
let domX = e.changedTouches[0].pageX - mouseX - el.offsetLeft//鼠标到最左侧距离减去鼠标到dom距离再减去已经有的left值
let domY = e.changedTouches[0].pageY - mouseY - el.offsetTop
let mouse = true
document.onmousemove = function(e:any){
let touchMove = function(e:any){
if(mouse){
let left = ( e.x-mouseX + 2 - domX )/(elParent.offsetWidth)*100+'%'
let top = (e.y-mouseY + 2 - domY)/(elParent.offsetHeight)*100+'%'
let left = ( e.changedTouches[0].pageX-mouseX + 2 - domX )/(elParent.offsetWidth)*100+'%'
let top = (e.changedTouches[0].pageY-mouseY + 2 - domY)/(elParent.offsetHeight)*100+'%'
el.style.left = left
el.style.top = top;
el.previousSibling.style.top = top
@@ -539,33 +546,39 @@ export default defineComponent({
}
}
}
document.onmouseup = function(){
mouse = false
}
el.parentNode.addEventListener('touchmove',touchMove ,false);
document.addEventListener('touchend', () => {
mouse = false;
el.parentNode.removeEventListener('touchmove',touchMove );
el.parentNode.children.forEach((v:any) =>{
v.classList.remove('eventNode')
})
});
})
},
},
modelImg:{
mounted(el) {
let parentNode = el.parentNode
if(parentNode.offsetHeight > parentNode.offsetWidth){
el.style.height = 100+'%'
el.style.width = 'auto'
}else{
el.style.width = 100+'%'
el.style.height = 'auto'
}
},
updated (el) {
let parentNode = el.parentNode
if(parentNode.offsetHeight > parentNode.offsetWidth){
el.style.height = 100+'%'
el.style.width = 'auto'
}else{
el.style.width = 100+'%'
el.style.height = 'auto'
}
}
// mounted(el) {
// let parentNode = el.parentNode
// if(parentNode.offsetHeight > parentNode.offsetWidth){
// el.style.height = 100+'%'
// el.style.width = 'auto'
// }else{
// el.style.width = 100+'%'
// el.style.height = 'auto'
// }
// },
// updated (el) {
// let parentNode = el.parentNode
// if(parentNode.offsetHeight > parentNode.offsetWidth){
// el.style.height = 100+'%'
// el.style.width = 'auto'
// }else{
// el.style.width = 100+'%'
// el.style.height = 'auto'
// }
// }
}
},
methods: {
@@ -774,8 +787,8 @@ export default defineComponent({
li{
cursor: pointer;
// border-radius: 50%;
width: 1rem;
height: 1rem;
width: 2rem;
height: 2rem;
background-color: rgb(20, 188, 255);
position: absolute;
z-index: 1049;
@@ -826,8 +839,8 @@ export default defineComponent({
top: calc(50% - 30px);
left: 50%;
transform: translate(-50%,-50%) ;
width: 1.5rem;
height: 1.5rem;
width: 2rem;
height: 2rem;
border-radius: 50%;
}
.layout_translate{
@@ -839,8 +852,8 @@ export default defineComponent({
}
.layout_angle_tr,.layout_angle_tl,.layout_angle_br,.layout_angle_bl{
// opacity: 0;
width: .8rem;
height: .8rem;
width: 2rem;
height: 2rem;
}
.layout_angle_tr{
right: 0%;
@@ -952,6 +965,39 @@ export default defineComponent({
}
}
}
.layout_right{
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 5rem;
overflow-x: hidden;
// background-color: #000;
width: 8%;
height: 50%;
&.layout_left::-webkit-scrollbar {
display: none;
}
.layout_left_text{
font-size: var(--aida-fsize1-6);
margin-bottom: 1rem;
color: #000;
}
.layout_left_items{
width: 100%;
height: 6rem;
display: flex;
align-content: space-between;
justify-content: space-between;
flex-wrap: wrap;
flex-direction: column;
margin-bottom: 2rem;
cursor: pointer;
.layout_left_item{
box-sizing: border-box;
border: 1px solid #000;
}
}
}
.submit_button {
margin: 2rem auto 0;
}

View File

@@ -311,7 +311,8 @@ export default {
DesignPrintOperation:{
Placement:'调整位置',
Overall:'整体',
Single:'单个',
Single:'比例',
Scale:'Scale',
Random:'随机',
inputContent:'输入名字进行搜索',
preview:'预览',

View File

@@ -309,6 +309,7 @@ export default {
Placement:'Placement',
Overall:'Overall',
Single:'Single',
Scale:'Scale',
Random:'Random',
inputContent:'Please input',
preview:'preview',

View File

@@ -314,6 +314,7 @@ export default {
Placement:'Placement',
Overall:"tous",
Single:'Célibataire',
Scale:'Échelle',
Random:'Aléatoire',
inputContent:'Veuillez saisir',
preview:'Aperçu',

View File

@@ -313,6 +313,7 @@ export default {
Placement:'Posizionamento',
Overall:'Tutto',
Single:'Separare',
Scale:'Scala',
Random:'Casuale',
inputContent:'Per favore inserisci',
preview:'anteprima',

View File

@@ -313,6 +313,7 @@ export default {
Placement:'配置',
Overall:'全体',
Single:'シングル',
Scale:'スケール',
Random:'ランダム',
inputContent:'入力してください',
preview:'プレビュー',

View File

@@ -313,6 +313,7 @@ export default {
Placement:'놓기',
Overall:'전반적인',
Single:'하나의',
Scale:'규모',
Random:'무작위의',
inputContent:'입력해주세요',
preview:'시사',

View File

@@ -313,6 +313,7 @@ export default {
Placement:'Размещение',
Overall:'Общий',
Single:'Одинокий',
Scale:'Масштаб',
Random:'Случайный',
inputContent:'Пожалуйста, введите',
preview:'просмотр',

View File

@@ -311,6 +311,7 @@ export default {
Placement:'ตำแหน่ง',
Overall:'โดยรวม',
Single:'เดี่ยว',
Scale:'มาตราส่วน',
Random:'สุ่ม',
inputContent:'กรุณาป้อนข้อมูล',
preview:'ดูตัวอย่าง',

View File

@@ -313,6 +313,7 @@ export default {
Placement:'Vị trí',
Overall:'Tổng thể',
Single:'Đơn',
Scale:'Tỷ lệ',
Random:'Ngẫu nhiên',
inputContent:'Xin vui lòng nhập',
preview:'xem trước',

View File

@@ -9,6 +9,7 @@ interface DesignDetail{
templateId:any,
templateImgUrl:any,
designId:any,
showSketchList:any,
}
@@ -21,9 +22,12 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
templateId:'',
templateImgUrl:'',
designId:'',
showSketchList:[],
},
mutations:{
setshowSketchList(state,data){
state.showSketchList = data
},
setDesignCollectionList(state,data){
state.designCollectionList = data
},

View File

@@ -177,12 +177,12 @@ const openGuide = () =>{
driver:false,
}
}
// driverObj__.destroy();
driverObj__.drive();
driverObj__.destroy();
// driverObj__.drive();
data = {
index:driverIndex__,
driver:true,
driver:false,
}
store = useStore()
// driverObj__.moveTo(18);