This commit is contained in:
X1627315083
2024-01-04 09:40:28 +08:00
parent 003d8da364
commit 21c5fad138
10 changed files with 64 additions and 18 deletions

View File

@@ -145,13 +145,15 @@
</template>
<script lang="ts">
import { defineComponent,computed,ref,provide,nextTick } from 'vue'
import { defineComponent,computed,ref,provide,nextTick,createVNode} from 'vue'
import DesignDetailAlter from '@/component/Detail/DesignDetailAlter.vue'
import magnifyingGlass from '@/component/Detail/magnifyingGlass.vue'
import setDesignItem from '@/component/Detail/setDesignItem.vue'
import setDesignItemMobile from '@/component/Detail/setDesignItemMobile.vue'
import Draggable from 'vuedraggable'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { Https } from "@/tool/https";
import { Modal,message } from 'ant-design-vue';
import {getUploadUrl,isMoible} from '@/tool/util'
import { useStore } from "vuex";
import { openGuide,driverObj__ } from "@/tool/guide";
@@ -360,12 +362,34 @@ export default defineComponent({
closeModal(){
if(this.designShowPrview == 1){
this.designDetailShow = false
this.designOrder = false
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.terminate()
// this.designItemDetail = {}
this.frontBack = {}
if(this.ifSubmit){
let _this = this
Modal.confirm({
title: this.t('DesignPrintOperation.jsContent1'),
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
centered:true,
onOk() {
_this.designDetailShow = false
_this.designOrder = false
let DesignDetailAlter:any = _this.$refs.DesignDetailAlter
DesignDetailAlter.terminate()
// _this.designItemDetail = {}
_this.frontBack = {}
}
});
}else{
this.designDetailShow = false
this.designOrder = false
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.terminate()
// this.designItemDetail = {}
this.frontBack = {}
}
}else{
this.designShowPrview = 1;
// this.designItemDetailUrl = {}
@@ -762,6 +786,7 @@ export default defineComponent({
this.loadingShow = true
Https.axiosPost(Https.httpUrls.designSingle, data).then(
(rv) => {
designItemDetail.currentFullBodyView = rv.currentFullBodyView
designItemDetail.ifSubmit = true
this.loadingShow = false
this.store.commit("setDesignItemDetail", designItemDetail);

View File

@@ -480,7 +480,7 @@ export default defineComponent({
},
workspaceCom(newVal,oldVal){
this.workspace = newVal
this.upload.gender = newVal.sexEnum.name
this.upload.gender = newVal?.sexEnum?.name
this.getPosition()
},
},

View File

@@ -388,7 +388,10 @@ export default defineComponent({
})
data.designSingleItemDTOList.forEach((item)=>{
let front = arr
let imageCategory1 = arr[1].imageCategory
let imageCategory1
if(arr.length > 1){
imageCategory1 = arr[1].imageCategory
}
for (let index = 0; index < arr.length; index++) {
if(item.id == arr[index].id && !arr[index].similarity){
let y = ((arr[index]?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - arr[index]?.position[0])
@@ -404,7 +407,7 @@ export default defineComponent({
break
}
}
if(item.type == this.capitalizeFirstLetter(imageCategory1)){
if(arr.length > 1 && item.type == this.capitalizeFirstLetter(imageCategory1)){
item.scale = front?.imageSize?Number(((front?.style?.width.replace(/px/g,'')*ratio)/front?.imageSize[0]).toFixed(2)):1
}
})

View File

@@ -387,7 +387,10 @@ export default defineComponent({
})
data.designSingleItemDTOList.forEach((item)=>{
let front = arr
let imageCategory1 = arr[1].imageCategory
let imageCategory1
if(arr.length > 1){
imageCategory1 = arr[1].imageCategory
}
arr.forEach((i)=>{
let imageCategory = i.imageCategory.split('_')[0]
if(item.id == i.id){
@@ -402,7 +405,7 @@ export default defineComponent({
// item.offset = [(i?.style?.left.replace(/px/g,'')*ratio).toFixed(0),(i?.style?.top.replace(/px/g,'')*ratio).toFixed(0)]
}
})
if(item.type == this.capitalizeFirstLetter(imageCategory1)){
if(arr.length > 1 && item.type == this.capitalizeFirstLetter(imageCategory1)){
item.scale = front?.imageSize?Number(((front?.style?.width.replace(/px/g,'')*ratio)/front?.imageSize[0]).toFixed(2)):1
}
})