diff --git a/src/assets/images/homePage/bg.png b/src/assets/images/homePage/bg.png deleted file mode 100644 index 6f505779..00000000 Binary files a/src/assets/images/homePage/bg.png and /dev/null differ diff --git a/src/assets/images/homePage/home-bg.png b/src/assets/images/homePage/home-bg.png deleted file mode 100644 index de78fc0f..00000000 Binary files a/src/assets/images/homePage/home-bg.png and /dev/null differ diff --git a/src/assets/images/homePage/loginLeftImg1.png b/src/assets/images/homePage/loginLeftImg1.png new file mode 100644 index 00000000..7cf756d5 Binary files /dev/null and b/src/assets/images/homePage/loginLeftImg1.png differ diff --git a/src/assets/images/homePage/loginLeftImg2.png b/src/assets/images/homePage/loginLeftImg2.png new file mode 100644 index 00000000..373cbfcb Binary files /dev/null and b/src/assets/images/homePage/loginLeftImg2.png differ diff --git a/src/assets/images/homePage/productDrawingDesign.png b/src/assets/images/homePage/productDrawingDesign.png deleted file mode 100644 index 9fa6cb91..00000000 Binary files a/src/assets/images/homePage/productDrawingDesign.png and /dev/null differ diff --git a/src/assets/images/homePage/seriesDesign.png b/src/assets/images/homePage/seriesDesign.png deleted file mode 100644 index 1e9fdacf..00000000 Binary files a/src/assets/images/homePage/seriesDesign.png and /dev/null differ diff --git a/src/assets/images/homePage/singleProductDesign.png b/src/assets/images/homePage/singleProductDesign.png deleted file mode 100644 index a3f9b0e0..00000000 Binary files a/src/assets/images/homePage/singleProductDesign.png and /dev/null differ diff --git a/src/assets/images/homePage/sketchDesign.png b/src/assets/images/homePage/sketchDesign.png deleted file mode 100644 index d4d8da90..00000000 Binary files a/src/assets/images/homePage/sketchDesign.png and /dev/null differ diff --git a/src/assets/images/homePage/squareLeftImg.png b/src/assets/images/homePage/squareLeftImg.png new file mode 100644 index 00000000..89b4b806 Binary files /dev/null and b/src/assets/images/homePage/squareLeftImg.png differ diff --git a/src/assets/images/homePage/system_model.png b/src/assets/images/homePage/system_model.png deleted file mode 100644 index 3b95ecbe..00000000 Binary files a/src/assets/images/homePage/system_model.png and /dev/null differ diff --git a/src/assets/images/icon/alipay.svg b/src/assets/images/icon/alipay.svg new file mode 100644 index 00000000..a5e2f140 --- /dev/null +++ b/src/assets/images/icon/alipay.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/icon/paymentIntroduce1.png b/src/assets/images/icon/paymentIntroduce1.png new file mode 100644 index 00000000..eefa622d Binary files /dev/null and b/src/assets/images/icon/paymentIntroduce1.png differ diff --git a/src/assets/images/icon/paymentIntroduce2.png b/src/assets/images/icon/paymentIntroduce2.png new file mode 100644 index 00000000..26d270bf Binary files /dev/null and b/src/assets/images/icon/paymentIntroduce2.png differ diff --git a/src/assets/images/icon/paymentIntroduce3.png b/src/assets/images/icon/paymentIntroduce3.png new file mode 100644 index 00000000..ebf5d5e3 Binary files /dev/null and b/src/assets/images/icon/paymentIntroduce3.png differ diff --git a/src/assets/images/icon/paymentIntroduce4.png b/src/assets/images/icon/paymentIntroduce4.png new file mode 100644 index 00000000..bb9134cb Binary files /dev/null and b/src/assets/images/icon/paymentIntroduce4.png differ diff --git a/src/assets/images/icon/paymentVideo.mp4 b/src/assets/images/icon/paymentVideo.mp4 new file mode 100644 index 00000000..5dec60bc Binary files /dev/null and b/src/assets/images/icon/paymentVideo.mp4 differ diff --git a/src/assets/images/icon/stripe.svg b/src/assets/images/icon/stripe.svg new file mode 100644 index 00000000..56ed2c90 --- /dev/null +++ b/src/assets/images/icon/stripe.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/style/style.css b/src/assets/style/style.css index cf99ac0f..0096eae5 100644 --- a/src/assets/style/style.css +++ b/src/assets/style/style.css @@ -2247,7 +2247,12 @@ textarea:focus { .generage_btn_box .fi-bs-magic-wand.forbidden { cursor: no-drop; } +.generage_btn_box.white .generage_btn { + background-color: #fff; + color: #000; +} .generage_btn_box .generage_btn { + border: 2px solid #000; margin-left: 2rem; display: flex; font-size: 1.6rem; @@ -2257,9 +2262,6 @@ textarea:focus { line-height: 5.4rem; height: 5.4rem; } -.generage_btn_box .generage_btn { - width: 10rem; -} .generage_btn_box .icon-xiala { margin-left: 1rem; transition: all 0.3s; @@ -2271,24 +2273,26 @@ textarea:focus { .generage_btn_box .content { position: absolute; top: 100%; - width: calc(100% - 2rem); - left: 0rem; + width: min-content; + min-width: 8rem; text-align: center; border-radius: calc(1rem*1.2); overflow: hidden; z-index: 3; margin-top: 0.2rem; - margin-left: 2rem; + right: 0; + left: auto; } .generage_btn_box .content > div { background: #cccccc; line-height: 2; - font-size: 1.8rem; + font-size: 1.4rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; + padding: 0.4rem 1.2rem; } .generage_btn_box .content > div.active { background-color: #000; diff --git a/src/assets/style/style.less b/src/assets/style/style.less index af35e141..2ff27053 100644 --- a/src/assets/style/style.less +++ b/src/assets/style/style.less @@ -2169,8 +2169,15 @@ textarea:focus{ cursor: no-drop; } } + &.white{ + .generage_btn{ + background-color: #fff; + color: #000; + } + } .generage_btn{ // margin: 0 auto; + border: 2px solid #000; margin-left: 2rem; display: flex; font-size: 1.6rem; @@ -2181,7 +2188,7 @@ textarea:focus{ height: 5.4rem; } .generage_btn{ - width: 10rem; + // width: 10rem; } .icon-xiala{ margin-left: 1rem; @@ -2194,23 +2201,26 @@ textarea:focus{ .content{ position: absolute; top: 100%; - width: calc(100% - 2rem); - left: 0rem; + // width: calc(100% - 2rem); + width: min-content; + min-width: 8rem; text-align: center; border-radius: calc(1rem* 1.2); overflow: hidden; z-index: 3; margin-top: .2rem; - margin-left: 2rem; + right: 0; + left: auto; >div{ background: #cccccc; line-height: 2; - font-size: 1.8rem; + font-size: 1.4rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; + padding: .4rem 1.2rem; &.active{ background-color: #000; } diff --git a/src/component/Canvas/canvasExample.vue b/src/component/Canvas/canvasExample.vue index 2096baf7..10cb7c4b 100644 --- a/src/component/Canvas/canvasExample.vue +++ b/src/component/Canvas/canvasExample.vue @@ -80,7 +80,8 @@ const loadImageUrlToLayer = async () => { try { const imageUrl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABrQAAAZNCAYAAACENbGaAAAAAXNSR0IArs4c6QAAIABJREFUeF7s3Yt208YaBtCflkuhhXLv+z/e4X6HQiFnfbYmTIwDsRM7srS91ixJY8WW9kjjVh8jXS"; - const layerId = await canvasEditor?.value?.addImageToLayer?.(imageUrl); + const layerId = await canvasEditor?.value?.addImageToLayer?.(imageUrl,{layerId:canvasEditor?.value.layers[0].id}); + // const layerId = await canvasEditor?.value?.addImageToLayer?.(imageUrl); console.log("新图层ID:", layerId); } catch (error) { console.error("加载图片到图层失败:", error); diff --git a/src/component/DetailCopy/canvas/index.vue b/src/component/DetailCopy/canvas/index.vue index b20320f0..2e7f4699 100644 --- a/src/component/DetailCopy/canvas/index.vue +++ b/src/component/DetailCopy/canvas/index.vue @@ -19,13 +19,22 @@ -->
- + ref="editCanvas"> + +
@@ -35,7 +44,7 @@ ref="editFrontBack"> --> - + ref="editCanvasBackFront"> + +
@@ -111,6 +127,7 @@ export default defineComponent({ canvasLoad:false, canvasConfig:{ } as any, + currentView:'canvasEditor', }) watch(()=>detailData.selectDetail,(newValue,oldValue)=>{ detailData.imgDomIndex = detailData.frontBack.front.findIndex((item:any)=>item.id == newValue.id) @@ -215,6 +232,9 @@ export default defineComponent({ }) } + const setCurrentView = (str:string)=>{ + detailData.currentView = str + } onBeforeUnmount(()=>{ console.log(12312) sessionStorage.removeItem('frontBackEdit'); @@ -237,6 +257,7 @@ export default defineComponent({ privewDetail, setFrontBackColor, frontBackChange, + setCurrentView, } }, provide() { @@ -338,4 +359,56 @@ export default defineComponent({ } } + +.custom-tool-btn { + position: relative; + width: 36px; + height: 36px; + display: flex; + align-items: center; + justify-content: center; + background: none; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 16px; + color: #333; + transition: all 0.2s ease; +} + +.custom-tool-btn:hover { + background-color: #f0f0f0; +} + +.custom-tool-btn:hover .tool-tooltip { + display: block; +} + +.tool-tooltip { + display: none; + position: absolute; + left: 100%; + top: 50%; + transform: translateY(-50%); + background-color: rgba(0, 0, 0, 0.7); + color: white; + padding: 4px 8px; + border-radius: 4px; + margin-left: 8px; + white-space: nowrap; + font-size: 12px; + z-index: 10; +} + +.tool-tooltip:before { + content: ""; + position: absolute; + top: 50%; + right: 100%; + margin-top: -5px; + border-width: 5px; + border-style: solid; + border-color: transparent rgba(0, 0, 0, 0.7) transparent transparent; +} + \ No newline at end of file diff --git a/src/component/DetailCopy/designDetail.vue b/src/component/DetailCopy/designDetail.vue index 7b914aab..6fd3a197 100644 --- a/src/component/DetailCopy/designDetail.vue +++ b/src/component/DetailCopy/designDetail.vue @@ -48,6 +48,9 @@
+
+ +
@@ -59,9 +62,9 @@ @revocation="revocation" @oppositeRevocation="oppositeRevocation" > -
+
- +
@@ -69,6 +72,17 @@
+
+ +
@@ -76,8 +90,6 @@ -
-
@@ -500,6 +512,8 @@ export default defineComponent({ overflow: hidden; &.detailLeft{ width: 34rem; + display: flex; + flex-direction: column; } &.isEditPattern{width: 0px;} &.model{ @@ -512,14 +526,19 @@ export default defineComponent({ flex: 1; display: flex; flex-direction: column; - padding-bottom: calc(6rem + 1rem); + // padding-bottom: calc(6rem + 1rem); overflow: hidden; > .contentRight{ + text-align: center; display: flex; flex: 1; + flex-direction: column; overflow: hidden; } } + .btn{ + margin-top: auto; + } > .submit{ display: flex; justify-content: flex-end; diff --git a/src/component/DetailCopy/detailLeft/colorBox/index.vue b/src/component/DetailCopy/detailLeft/colorBox/index.vue index ef79a8a7..26e8bced 100644 --- a/src/component/DetailCopy/detailLeft/colorBox/index.vue +++ b/src/component/DetailCopy/detailLeft/colorBox/index.vue @@ -24,9 +24,10 @@
+
-
{{$t('DesignPrintOperation.ExtractColor')}}
+ @@ -106,54 +107,113 @@ export default defineComponent({ }else{ return } - let isNoSelect = false - let isOneChecked = false + let pushIndex = 0 for (let index = 0; index < 9; index++) { colorData.allBoardData.colorBoards let item:any = {} item = colorData.allBoardData.colorBoards[index] + let color = colorData.allBoardData.colorBoards?.[index] + if(!color?.rgba && color?.rgbValue)color.rgba = color.rgbValue + if( colorData.allBoardData.colorBoards?.[index] && - colorData.selectDetail.color.rgba?.r == colorData.allBoardData.colorBoards?.[index]?.rgba?.[0] && - colorData.selectDetail.color.rgba?.g == colorData.allBoardData.colorBoards?.[index]?.rgba?.[1] && - colorData.selectDetail.color.rgba?.b == colorData.allBoardData.colorBoards?.[index]?.rgba?.[2] && - JSON.stringify(colorData.selectDetail.color.gradient) == JSON.stringify(colorData.allBoardData.colorBoards?.[index]?.gradient) + colorData.selectDetail.color.rgba?.r == color?.rgba?.r && + colorData.selectDetail.color.rgba?.g == color?.rgba?.g && + colorData.selectDetail.color.rgba?.b == color?.rgba?.b && + JSON.stringify(colorData.selectDetail.color.gradient) == JSON.stringify(color?.gradient) && colorData.selectDetail.color.rgba?.r ){ - if(!isOneChecked){ - isOneChecked = true - if(colorData.allBoardData.colorBoards?.[index].gradient){ - item.gradient = colorData.allBoardData.colorBoards?.[index].gradient - } - colorData.selectColor = item - colorData.colorList.index = index - } - }else if(colorData.selectDetail.color.rgba?.r){ - if(!isNoSelect){ - item = { - hex:rgbaToHex([colorData.selectDetail.color.rgba.r,colorData.selectDetail.color.rgba.g,colorData.selectDetail.color.rgba.b]), - id:colorData.selectDetail.color.id, - rgba:{ - r:colorData.selectDetail.color.rgba.r, - g:colorData.selectDetail.color.rgba.g, - b:colorData.selectDetail.color.rgba.b, - }, - tcx:colorData.selectDetail.color.tcx, - name:colorData.selectDetail.color.name, - } - if(colorData.selectDetail.color.gradient){ - item.gradient = colorData.selectDetail.color.gradient - } - colorData.colorList.index = index - colorData.selectColor = item - isNoSelect = true - }else{ - item = {} + isNoSelect = true + colorData.selectColor = item + colorData.colorList.index = index + }else if(color?.rgba?.r){ + pushIndex = index + item = { + hex:rgbaToHex([color?.rgba.r,color?.rgba.g,color?.rgba.b]), + id:color?.id, + rgba:{ + r:color?.rgba.r, + g:color?.rgba.g, + b:color?.rgba.b, + }, + tcx:color?.tcx, + name:color?.name, } + if(color?.gradient){ + item.gradient = color?.gradient + } + colorData.colorList.index = index + colorData.selectColor = item } colorData.colorList.list[newVal].push(item) } + if(!isNoSelect){ + let item = { + hex:rgbaToHex([colorData.selectDetail.color.rgba.r,colorData.selectDetail.color.rgba.g,colorData.selectDetail.color.rgba.b]), + id:colorData.selectDetail.color.id, + rgba:{ + r:colorData.selectDetail.color.rgba.r, + g:colorData.selectDetail.color.rgba.g, + b:colorData.selectDetail.color.rgba.b, + }, + tcx:colorData.selectDetail.color.tcx, + name:colorData.selectDetail.color.name, + } as any + if(colorData.selectDetail.color.gradient){ + item.gradient = colorData.selectDetail.color.gradient + } + colorData.selectColor = item + colorData.colorList.index = pushIndex + 1 + colorData.colorList.list[newVal][pushIndex + 1] = item + } + + // for (let index = 0; index < 9; index++) { + // colorData.allBoardData.colorBoards + // let item:any = {} + // item = colorData.allBoardData.colorBoards[index] + // if( + // colorData.allBoardData.colorBoards?.[index] && + // colorData.selectDetail.color.rgba?.r == colorData.allBoardData.colorBoards?.[index]?.rgba?.r && + // colorData.selectDetail.color.rgba?.g == colorData.allBoardData.colorBoards?.[index]?.rgba?.g && + // colorData.selectDetail.color.rgba?.b == colorData.allBoardData.colorBoards?.[index]?.rgba?.b && + // JSON.stringify(colorData.selectDetail.color.gradient) == JSON.stringify(colorData.allBoardData.colorBoards?.[index]?.gradient) + // && colorData.selectDetail.color.rgba?.r + // ){ + // console.log(13212) + // if(!isOneChecked){ + // isOneChecked = true + // if(colorData.allBoardData.colorBoards?.[index].gradient){ + // item.gradient = colorData.allBoardData.colorBoards?.[index].gradient + // } + // colorData.selectColor = item + // colorData.colorList.index = index + // } + // }else if(colorData.selectDetail.color.rgba?.r){ + // if(!isNoSelect){ + // item = { + // hex:rgbaToHex([colorData.selectDetail.color.rgba.r,colorData.selectDetail.color.rgba.g,colorData.selectDetail.color.rgba.b]), + // id:colorData.selectDetail.color.id, + // rgba:{ + // r:colorData.selectDetail.color.rgba.r, + // g:colorData.selectDetail.color.rgba.g, + // b:colorData.selectDetail.color.rgba.b, + // }, + // tcx:colorData.selectDetail.color.tcx, + // name:colorData.selectDetail.color.name, + // } + // if(colorData.selectDetail.color.gradient){ + // item.gradient = colorData.selectDetail.color.gradient + // } + // colorData.colorList.index = index + // colorData.selectColor = item + // isNoSelect = true + // }else{ + // item = {} + // } + // } + // colorData.colorList.list[newVal].push(item) + // } },{immediate: true}) const selectImgItem = ()=>{ @@ -316,7 +376,22 @@ export default defineComponent({ > .generalModel_state_item{ width: 100%; margin: 0; + border-radius: 1rem; + border: 1px solid; + overflow: hidden; + display: flex; input{ + border: none; + background: #f4f4f4; + } + i{ + width: 5rem; + border-left: 1px solid; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + height: 100%; background: #f4f4f4; } } diff --git a/src/component/DetailCopy/detailLeft/index.vue b/src/component/DetailCopy/detailLeft/index.vue index 947892f8..431725e1 100644 --- a/src/component/DetailCopy/detailLeft/index.vue +++ b/src/component/DetailCopy/detailLeft/index.vue @@ -70,5 +70,7 @@ export default defineComponent({ width: 34rem; // width: 100%; height: 100%; + display: flex; + flex-direction: column; } \ No newline at end of file diff --git a/src/component/DetailCopy/detailLeft/module/currentList.vue b/src/component/DetailCopy/detailLeft/module/currentList.vue index e9841b34..2d879072 100644 --- a/src/component/DetailCopy/detailLeft/module/currentList.vue +++ b/src/component/DetailCopy/detailLeft/module/currentList.vue @@ -51,7 +51,6 @@ export default defineComponent({ currentDetailType:computed(()=>store.state.DesignDetailCopy.currentDetailType), }) - const getDetailListData = reactive({ }) diff --git a/src/component/DetailCopy/detailLeft/module/libraryList.vue b/src/component/DetailCopy/detailLeft/module/libraryList.vue index 9b020b56..63843e2c 100644 --- a/src/component/DetailCopy/detailLeft/module/libraryList.vue +++ b/src/component/DetailCopy/detailLeft/module/libraryList.vue @@ -1,7 +1,7 @@ -
+
-
+
@@ -98,8 +98,8 @@
- - + +
diff --git a/src/component/DetailCopy/detailLeft/module/selectList.vue b/src/component/DetailCopy/detailLeft/module/selectList.vue index b6b443af..82dd4e81 100644 --- a/src/component/DetailCopy/detailLeft/module/selectList.vue +++ b/src/component/DetailCopy/detailLeft/module/selectList.vue @@ -8,7 +8,7 @@ :class="[selectTitle == 'current' ? 'select_swtich' : '',]" v-if="deReconstructionList.length == 0" > - {{ $t('DesignDetailAlter.current') }} + {{ $t('DesignDetailAlter.inProject') }}
+
+
+
+ + +
+
+
@@ -122,6 +135,24 @@ export default defineComponent({ scale:0, }, loadingShow:false, + printElementList:null as any, + }) + const collItemSize = reactive({ + collValue:18, + num:1, + prentWidth:0 as any, + padding:10, + likeStyle:{ + + }, + itemStyle:{ + width:0, + height:0, + }, + collTime:null as any, + isMove:false, + elList:[] as any, + selectIndex:0, }) const setOveralSingle = ()=>{ @@ -177,6 +208,7 @@ export default defineComponent({ scale, } getItemPosition(item) + setItemPosition() store.commit('DesignDetailCopy/setCurrentPrintElement',null) } const previewDetailPrintData = ()=>{ @@ -256,16 +288,13 @@ export default defineComponent({ let pattern = { centers:{left:0,top:0}, style:{ - // left:(boor?left:Math.trunc(Math.random()*x)+1)+"px", - // top:(boor?top:Math.trunc(Math.random()*y)+1)+"px", left:left+'px', top:top+'px', right:"auto", bottom:"auto", width:editPrintElementData.sketchWH.width*item.scale[0]+'px', height:editPrintElementData.sketchWH.height*item.scale[1]+'px', - zIndex:item.priority, - // zIndex:this.printZIndex++ + // zIndex:item.priority, }, transform:{ rotateZ:item.angle?item.angle:0 @@ -280,6 +309,7 @@ export default defineComponent({ editPrintElementData.printStyleList[props.type].overall = [] editPrintElementData.printStyleList[props.type].overall.push(item) } + } const setPosition = ()=>{ nextTick(()=>{ @@ -309,6 +339,7 @@ export default defineComponent({ } getItemPosition(item) }) + setItemPosition() } if(props.type == 'print'){ editPrintElementData.overallSingle = state @@ -345,7 +376,7 @@ export default defineComponent({ let scale = Number(editPrintElementDom.imgDom.children[0].style.transform?.split('scale(')[1]?.split(')')[0]) let rotateZ = Number(editPrintElementDom.imgDom.children[0].style.transform?.split('rotateZ(')[1]?.split('deg')[0]) editPrintElementData.printStyleList[props.type][editPrintElementData.stateOverallSingle][index].pattern.designOpenrtionBtn = true - editPrintElementData.printStyleList[props.type][editPrintElementData.stateOverallSingle][index].pattern.style.zIndex = editPrintElementData.printZIndex++ + // editPrintElementData.printStyleList[props.type][editPrintElementData.stateOverallSingle][index].pattern.style.zIndex = editPrintElementData.printZIndex++ editPrintElementData.printStyleList[props.type][editPrintElementData.stateOverallSingle][index].pattern.transform = { scale:scale, rotateZ:rotateZ?rotateZ:0, @@ -479,10 +510,8 @@ export default defineComponent({ top:editPrintElementDom.imgDom.offsetTop+'px', height:editPrintElementDom.imgDom.offsetHeight+'px', width:editPrintElementDom.imgDom.offsetWidth+'px', - zIndex:editPrintElementData.printZIndex + // zIndex:editPrintElementData.printZIndex } - // document.removeEventListener("mouseup", sizeMouseup); - // document.removeEventListener("mousemove", sizeMousemove); document.removeEventListener('mousemove',sizeMouseMove) document.removeEventListener('touchmove',sizeTouchmove) document.removeEventListener('mouseup',sizeMouseup) @@ -490,8 +519,6 @@ export default defineComponent({ } const mouseup = (e:any)=>{ - // document.removeEventListener("mouseup", mouseup); - // document.removeEventListener("mousemove", moveMousemove); document.removeEventListener('mousemove',mouseMove) document.removeEventListener('touchmove',touchmove) document.removeEventListener('mouseup',mouseup) @@ -500,6 +527,191 @@ export default defineComponent({ const clearOverall = ()=>{ editPrintElementData.printStyleList[props.type].overall = [] } + + + const designMousedown = (e:any,uniqueId:number,str:string)=>{ + let item:any = collItemSize.elList.filter((item:any)=>item.uniqueId == uniqueId)[0] + if(!item)return + const pEl = editPrintElementData.printElementList; + item.el.style.zIndex = 2; + item.el.style.transition = 'all 0s'; + let startX = e.clientX, + startY = e.clientY, + startSL = + pEl.scrollLeft, + left = item.el.offsetLeft, + top = item.el.offsetTop; + collItemSize.isMove = false; + const elWidth = item.el.offsetWidth; + + + var toMovePx = 1; + var toMoveType = "";//left right + let moveFun = (e:any) => { + collItemSize.isMove = true + let X = e.clientX - startX + (pEl.scrollLeft - startSL) + left; + let Y = 0; + if(X < 0) X = 0; + const maxLeft = parseInt(collItemSize.prentWidth) - elWidth - collItemSize.padding ; + if(X > maxLeft) X = maxLeft; + item.el.style.left = `${X}px`; + item.el.style.top = `${Y}px`; + + const pElBCR = pEl.getBoundingClientRect(); + var num = 2; + if(X < pEl.scrollLeft){ + toMoveType = "left"; + num = pElBCR.x-e.clientX; + }else if(X > pEl.scrollLeft + pEl.clientWidth - elWidth){ + toMoveType = "right"; + num = e.clientX - pElBCR.x - pElBCR.width; + }else{ + toMoveType = ""; + } + toMovePx = num / 20; + if(toMovePx < 2) toMovePx = 2; + + + reRange(item, X, Y,str); + }; + + const updataFun = ()=>{ + if(toMoveType == "left"){ + let left = pEl.scrollLeft - toMovePx; + if(left < 0)left = 0; + item.el.style.left = `${left}px`; + pEl.scrollLeft = left; + reRange(item, left, 0); + }else if(toMoveType == "right"){ + let left = pEl.scrollLeft + toMovePx; + if(left > pEl.scrollWidth - pEl.clientWidth)left = pEl.scrollWidth - pEl.clientWidth; + const elLeft = left + pEl.clientWidth - elWidth - collItemSize.padding; + item.el.style.left = `${elLeft}px`; + pEl.scrollLeft = left; + reRange(item, elLeft, 0); + }else if(toMoveType == "stop"){ + return; + } + requestAnimationFrame(updataFun); + } + updataFun(); + + let mouseUpFun = ()=>{ + toMoveType = "stop" + document.removeEventListener('mousemove',mouseMove) + document.removeEventListener('touchmove',touchmove) + + document.removeEventListener('mouseup',mouseUpFun) + document.removeEventListener('touchend',mouseUpFun) + item.el.style.zIndex = 1; + item.el.style.transition = 'top .5s'; + moveItem(); + sortDesignCollection() + } + let mouseMove = function(event:any){ + let e = getMousePosition(event,false) + moveFun(e) + } + let touchmove = function(event:any){ + let e = getMousePosition(event,true) + moveFun(e) + } + + document.addEventListener('mousemove',mouseMove) + document.addEventListener('touchmove',touchmove) + + document.addEventListener('mouseup',mouseUpFun) + document.addEventListener('touchend',mouseUpFun) + } + //排序 从大到小 + const sortDesignCollection = ()=> { + + } + const reRange = (item:any, x:number, y:number,str?:string)=>{ + let elList:any = collItemSize.elList + let index = collItemSize.selectIndex + let width,height,num + num = collItemSize.num + width = collItemSize.itemStyle.width + height = collItemSize.itemStyle.height + + let moveIndex = Math.round(x / (width + 10)) + Math.round(y / (height + 10)) * num; + moveIndex = elList.length - 1 - moveIndex + moveIndex = moveIndex < 0 ? 0 : moveIndex; + moveIndex = moveIndex > elList.length - 1 ? elList.length - 1 : moveIndex; + if(moveIndex != index){ + collItemSize.selectIndex = moveIndex; + let currentSort = item.sort; + for(let i = 0;i < elList.length;i++){ + if(currentSort < moveIndex){ + if(elList[i].sort > currentSort && elList[i].sort <= moveIndex){ + elList[i].sort -= 1; + }; + }else if(currentSort > moveIndex){ + if(elList[i].sort < currentSort && elList[i].sort >= moveIndex){ + elList[i].sort += 1; + }; + } + }; + elList[item.index].sort = moveIndex; + moveItem(); + } + } + const moveItem = ()=>{ + let value = collItemSize.num + for(let i = 0;i < collItemSize.elList.length;i++){ + let height = parseInt(String((collItemSize.elList.length - 1 - collItemSize.elList[i].sort) / value)) * (collItemSize.itemStyle.width +collItemSize.padding) + 'px'; + collItemSize.elList[i].el.style.left = height + } + setZIndex() + } + const navDelete = (item:any)=>{ + let arr:any = editPrintElementData.printStyleList[props.type][editPrintElementData.stateOverallSingle] + let index = arr.findIndex((arrItem:any)=>arrItem.uniqueId == item.uniqueId) + arr.splice(index,1) + setItemPosition() + } + const setZIndex = ()=>{ + let arr:any = editPrintElementData.printStyleList[props.type][editPrintElementData.stateOverallSingle] + collItemSize.elList.forEach((elItem:any)=>{ + let clothesIndex = arr.findIndex((item:any)=>item.uniqueId == elItem.uniqueId) + arr[clothesIndex].pattern.style.zIndex = elItem.sort + // let clothesId = editPrintElementData.designDetail.clothes[clothesIndex].id + // editPrintElementData.designDetail.clothes[clothesIndex].priority = elItem.sort + // let frontIndex = editPrintElementData.frontBack_.front.findIndex((item:any)=>item.id == clothesId) + // editPrintElementData.frontBack_.front[frontIndex].style.zIndex = elItem.sort + 10 + }) + } + const setItemPosition = async ()=>{ + // editPrintElementData.printStyleList[props.type][editPrintElementData.stateOverallSingle].splice(editPrintElementData.imgDomIndex,1) + await nextTick() + let parent = editPrintElementData.printElementList.offsetWidth + let elArr = editPrintElementData.printElementList.querySelectorAll('.imgItem') + let value = collItemSize.num + const htmlFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize); + const remValue = 8 * htmlFontSize; + //子元素宽度 = (父容器总宽度 - (列数-1)*间隙) / 列数 + collItemSize.itemStyle.width = remValue + collItemSize.elList = [] + let arr:any = editPrintElementData.printStyleList[props.type][editPrintElementData.stateOverallSingle] + + arr.forEach((item,index) => {item.uniqueId = `${Date.now()}_${index}`}); + + const sortedArray = [...arr].sort((a, b) => a.priority - b.priority); + const sortMap = {} as any; + sortedArray.forEach((item, index) => { + sortMap[item.priority] = index ; // 1, 2, 3, 4... + }); + for(let i = 0;i < elArr.length;i++){ + collItemSize.elList.push({ + el: elArr[i], + // sort: elArr.length - i -1, + sort: sortMap[arr[i].priority], + index: i, + uniqueId:arr[i]?.uniqueId || 99999, + }); + } + collItemSize.prentWidth = (collItemSize.padding + remValue) * elArr.length + 'px' + } onMounted(()=>{ if(props.type == 'element'){ editPrintElementData.stateOverallSingle = 'single' @@ -513,6 +725,7 @@ export default defineComponent({ getMousePosition, ...toRefs(editPrintElementDom), ...toRefs(editPrintElementData), + ...toRefs(collItemSize), setOveralSingle, formatter, itemMoveMousedown, @@ -520,6 +733,8 @@ export default defineComponent({ deletePrint, previewDetailPrintData, clearOverall, + designMousedown, + navDelete, } }, directives:{ @@ -656,6 +871,35 @@ export default defineComponent({ } } } + > .printElementList{ + width: 100%; + height: 10rem; + position: relative; + overflow-x: auto; + .itemList{ + height: 100%; + } + .imgItem{ + width: 8rem; + height: 8rem; + position: absolute; + cursor: pointer; + border-radius: 1rem; + overflow: hidden; + > img{ + width: 100%; + height: 100%; + object-fit: cover; + } + > i{ + position: absolute; + right: 1rem; + top: 1rem; + color: #fff; + text-shadow: 0px 0px 2px black, 0px 0px 2px black, 0px 0px 2px black; + } + } + } > .editPrintElementBox{ flex: 1; overflow: hidden; diff --git a/src/component/DetailCopy/detailRight/elementType.vue b/src/component/DetailCopy/detailRight/elementType.vue deleted file mode 100644 index 17d8506c..00000000 --- a/src/component/DetailCopy/detailRight/elementType.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - \ No newline at end of file diff --git a/src/component/DetailCopy/detailRight/index.vue b/src/component/DetailCopy/detailRight/index.vue index 3e78e609..6c81c19b 100644 --- a/src/component/DetailCopy/detailRight/index.vue +++ b/src/component/DetailCopy/detailRight/index.vue @@ -6,7 +6,6 @@
--> - @@ -20,15 +19,15 @@ import { useStore } from "vuex"; import sketchType from './sketchType.vue' import printType from './printType.vue' import editPrintElement from './editPrintElement.vue' -import elementType from './elementType.vue' import modelsType from './modelsType.vue' export default defineComponent({ components:{ - sketchType,printType,elementType,editPrintElement,modelsType + sketchType,printType,editPrintElement,modelsType }, setup(props,{emit}) { const store = useStore(); const detailData = reactive({ + designDetail:computed(()=>store.state.DesignDetailCopy.designDetail), editPrintElement:null as any, selectDetail:computed(()=>store.state.DesignDetailCopy.selectDetail), currentDetailType:computed(()=>store.state.DesignDetailCopy.currentDetailType), @@ -55,6 +54,7 @@ export default defineComponent({ display: flex; flex: 1; overflow: hidden; + flex-direction: column; > .detailText{ margin-bottom: 1rem; } diff --git a/src/component/DetailCopy/detailRight/modelsType.vue b/src/component/DetailCopy/detailRight/modelsType.vue index 8aebb707..795356cd 100644 --- a/src/component/DetailCopy/detailRight/modelsType.vue +++ b/src/component/DetailCopy/detailRight/modelsType.vue @@ -1,6 +1,6 @@ + + \ No newline at end of file diff --git a/src/lang/cn.ts b/src/lang/cn.ts index fb863aae..c6a44344 100644 --- a/src/lang/cn.ts +++ b/src/lang/cn.ts @@ -140,6 +140,7 @@ export default { Payment:'付款', PurchasePoints:'购买', paymentmethod:'请选择付款方式', + policy:'继续注册账号即表示您同意我们的使用条款与服务协议。', policy1:'我承认我已阅读并同意', policy2:'条款和条件', policy3:'(包括服务范围)及', @@ -557,6 +558,7 @@ export default { }, DesignDetailAlter:{ current:'当前使用', + inProject:'项目使用', Upload:'上传', Library:'收藏', inputContent1:'输入名字进行搜索', @@ -779,6 +781,25 @@ export default { HKDYear:'HKD / 年', automatically:'是否自动续费', activity1:'限时优惠,仅限今日!', + Strengths:'我们的优势', + StrengthsTitle1:'无限的灵感创意', + StrengthsTitle1_1:'', + StrengthsInfo1:'灵感生成只需几分钟', + StrengthsInfo1_1:'', + StrengthsTitle2:'可持续且具成本效', + StrengthsTitle2_1:'', + StrengthsInfo2:'精简流程,减少浪费', + StrengthsInfo2_1:'', + StrengthsTitle3:'适用于所有级别的群体', + StrengthsTitle3_1:'', + StrengthsInfo3:'易操作简便且功能强大,', + StrengthsInfo3_1:'适合各级别的设计师使用', + StrengthsInfo3_2:'', + StrengthsTitle4:'从灵感到成衣', + StrengthsTitle4_1:'', + StrengthsInfo4:'AiDA 全程助力', + StrengthsInfo4_1:'你的时尚设计旅程', + unlimited:'立即订阅!', }, cancelRenewal:{ cancelling:'您取消AiDA的原因是什么?', diff --git a/src/lang/en.ts b/src/lang/en.ts index 56d8300a..ef592273 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -140,6 +140,7 @@ export default { Payment:'Payment', PurchasePoints:'Purchase points', paymentmethod:'select a payment method', + policy:'By continuing an account, you agree to our Terms & Conditions', policy1:'I acknowledge that I have read, understand, and agree with the ', policy2:'Terms and Conditions', policy3:' (including the Scope of service) and the ', @@ -557,6 +558,7 @@ export default { }, DesignDetailAlter:{ current:'Selected', + inProject:'In-Project', Upload:'Upload', Library:'Library', inputContent1:'Please input', @@ -779,6 +781,25 @@ export default { HKDYear:'HKD / Year', automatically:'Whether to renew automatically', activity1:'Limited time offer, today only!', + Strengths:'Our Core Strengths', + StrengthsTitle1:'Unlimited', + StrengthsTitle1_1:'creativity', + StrengthsInfo1:'Generate ideas in minutes,', + StrengthsInfo1_1:'not hours.', + StrengthsTitle2:'Sustainable &', + StrengthsTitle2_1:'Cost-efficient', + StrengthsInfo2:'Streamline your process,', + StrengthsInfo2_1:'reduce waste.', + StrengthsTitle3:'AI design tool', + StrengthsTitle3_1:'for all levels', + StrengthsInfo3:'Easy to use with powerful AI features', + StrengthsInfo3_1:'to make design accessible and', + StrengthsInfo3_2:'efficient for everyone.', + StrengthsTitle4:'From Idea', + StrengthsTitle4_1:'to Garment', + StrengthsInfo4:'Support your entire', + StrengthsInfo4_1:'fashion design journey.', + unlimited:'Subscribe Now!', }, cancelRenewal:{ cancelling:'What is your reason for cancelling AiDA?', diff --git a/src/store/workspace/workspace.ts b/src/store/workspace/workspace.ts index 4004775d..8e84fb99 100644 --- a/src/store/workspace/workspace.ts +++ b/src/store/workspace/workspace.ts @@ -32,6 +32,7 @@ const Workspace : Module = { userBrandDna:'',//用户品牌 userBrandDnaImg:'',//用户品牌图片 userBrandDnaName:'',//用户品牌名字 + workspaceId:-1,//worspaceId publishData:{ id:'', portfolioDes:'', @@ -87,6 +88,7 @@ const Workspace : Module = { userBrandDna:'',//用户品牌 userBrandDnaImg:'',//用户品牌图片 userBrandDnaName:'',//用户品牌名字 + workspaceId:-1,//worspaceId publishData:{ id:'', portfolioDes:'', diff --git a/src/views/HomeMain.vue b/src/views/HomeMain.vue index 7ac2615f..c9d63d76 100644 --- a/src/views/HomeMain.vue +++ b/src/views/HomeMain.vue @@ -125,7 +125,7 @@
- +
diff --git a/src/views/HomeRecommend.vue b/src/views/HomeRecommend.vue index e806ee1b..8a134536 100644 --- a/src/views/HomeRecommend.vue +++ b/src/views/HomeRecommend.vue @@ -1,7 +1,8 @@