diff --git a/src/component/Detail/DesignDetail.vue b/src/component/Detail/DesignDetail.vue index 2e4f533f..322aef5a 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 3f776923..f4f0e940 100644 --- a/src/component/Detail/detailRight/editPrintElement.vue +++ b/src/component/Detail/detailRight/editPrintElement.vue @@ -912,6 +912,7 @@ export default defineComponent({ .itemList{ height: 100%; + object-fit: contain; } .imgItem{ width: 8rem; diff --git a/src/component/Detail/model/index.vue b/src/component/Detail/model/index.vue index c19c3e50..5bfc0a83 100644 --- a/src/component/Detail/model/index.vue +++ b/src/component/Detail/model/index.vue @@ -28,7 +28,7 @@ - + diff --git a/src/component/Detail/model/modelPosition.vue b/src/component/Detail/model/modelPosition.vue index 85fc5f0d..0411c794 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){ let item = detailData.designDetail.clothes.reduce((max, current) => { return current.priority > max.priority ? current : max; diff --git a/src/component/home/design/index.vue b/src/component/home/design/index.vue index 7999a1ef..dc08d8c2 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 3f70954e..4ad24d17 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 25ed87cc..1f2da2f7 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -584,6 +584,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",