From aba2fd03639e58e9f1b343708448faa4e21515ba Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Fri, 26 Sep 2025 17:13:29 +0800 Subject: [PATCH] =?UTF-8?q?detail=E5=88=A0=E9=99=A4=E6=89=80=E6=9C=89?= =?UTF-8?q?=E8=A1=A3=E6=9C=8Dpreview=E6=8A=A5=E9=94=99=EF=BC=8C=E8=BF=9B?= =?UTF-8?q?=E8=A1=8Cdesign=E6=B2=A1=E6=9C=89=E6=A8=A1=E7=89=B9=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/Detail/DesignDetail.vue | 2 +- src/component/Detail/detailRight/editPrintElement.vue | 2 +- src/component/Detail/model/index.vue | 2 +- src/component/Detail/model/modelPosition.vue | 7 ++++++- src/component/home/design/index.vue | 8 +++----- src/lang/cn.ts | 1 + src/lang/en.ts | 1 + 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/component/Detail/DesignDetail.vue b/src/component/Detail/DesignDetail.vue index f10847a4..044865d8 100644 --- a/src/component/Detail/DesignDetail.vue +++ b/src/component/Detail/DesignDetail.vue @@ -308,7 +308,7 @@ export default defineComponent({ `${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`: '') if(detailData.currentDetailType == 'sketch' && newData){ - color = detailData.designDetail.clothes[0].color?.rgba?.r?`${detailData.designDetail.clothes[0].color.rgba.r} ${detailData.designDetail.clothes[0].color.rgba.g} ${detailData.designDetail.clothes[0].color.rgba.b}`:'' + color = detailData.designDetail.clothes?.[0]?.color?.rgba?.r?`${detailData.designDetail.clothes?.[0].color.rgba.r} ${detailData.designDetail.clothes[0].color.rgba.g} ${detailData.designDetail.clothes[0].color.rgba.b}`:'' detailData.selectDetail.maskUrl = '' detailData.selectDetail.maskMinioUrl = '' } diff --git a/src/component/Detail/detailRight/editPrintElement.vue b/src/component/Detail/detailRight/editPrintElement.vue index 60004aaf..a5c77efb 100644 --- a/src/component/Detail/detailRight/editPrintElement.vue +++ b/src/component/Detail/detailRight/editPrintElement.vue @@ -914,7 +914,7 @@ export default defineComponent({ > img{ width: 100%; height: 100%; - object-fit: cover; + object-fit: contain; } > i{ position: absolute; diff --git a/src/component/Detail/model/index.vue b/src/component/Detail/model/index.vue index 37921146..07245dac 100644 --- a/src/component/Detail/model/index.vue +++ b/src/component/Detail/model/index.vue @@ -23,7 +23,7 @@ - + diff --git a/src/component/Detail/model/modelPosition.vue b/src/component/Detail/model/modelPosition.vue index 8d70f4b7..f2dc4cea 100644 --- a/src/component/Detail/model/modelPosition.vue +++ b/src/component/Detail/model/modelPosition.vue @@ -49,7 +49,7 @@ export default defineComponent({ type:Boolean, } }, - emits:['canvasReload'], + emits:['canvasReload','addSketch'], setup(props,{emit}) { const {t} = useI18n() const store = useStore(); @@ -82,6 +82,11 @@ export default defineComponent({ let dom = document.querySelector('.molepositon .perview_img') as any if(!detailData.frontBack?.body?.path || !dom)return img.onload = () => { + if(detailData.designDetail.clothes.length == 0){ + store.commit('DesignDetail/addDesignColthes') + emit('addSketch') + return + } if(!detailData.selectDetail?.id){ store.commit('DesignDetail/setDesignColthes',detailData.designDetail.clothes[0].id) } diff --git a/src/component/home/design/index.vue b/src/component/home/design/index.vue index 688ba236..d2cc27da 100644 --- a/src/component/home/design/index.vue +++ b/src/component/home/design/index.vue @@ -1591,12 +1591,10 @@ export default defineComponent({ //设计新的collection async designNewCollection() { clearTimeout(this.getDesignTime); + let probjects = this.store.state.Workspace.probjects + + if(probjects.type == "seriesDesign" && probjects?.model?.length == 0)return message.info(this.t('collectionModal.jsContent7')); let data = await this.getDesignData(""); - if(this.driver__.driver){ - nextTick().then(()=>{ - driverObj__.moveNext(); - }) - } this.isShowMark = true // this.store.commit("setLikeDesignCollectionList", []); Https.axiosPost(Https.httpUrls.designCollection, data) diff --git a/src/lang/cn.ts b/src/lang/cn.ts index 1c196e21..d716721b 100644 --- a/src/lang/cn.ts +++ b/src/lang/cn.ts @@ -584,6 +584,7 @@ export default { jsContent3: "您必须选择一种或多种颜色进行下一步。", jsContent5: "我们检测到您的({str})上的PIN数量超过了八个,这可能会导致一些已钉住的项目未被使用。您是否仍要继续?", jsContent6: "画布内容没有保存,请点击预保存后继续。", + jsContent7: "请至少选择一个模特", }, DesignDetail: { Details: "详情", diff --git a/src/lang/en.ts b/src/lang/en.ts index b770ca3c..55b65536 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -586,6 +586,7 @@ export default { jsContent3: "You must choose one or more colors for further process.", jsContent5: "We've detected that the number of pins on your ({str}) exceeds eight, which may result in some pinned items not being used. Would you like to continue anyway?", jsContent6: 'The content on the canvas has not been saved. Please click "Preview" to continue.', + jsContent7: "Please select at least one model.", }, DesignDetail: { Details: "Details",