fix
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
@@ -343,7 +343,7 @@ export default defineComponent({
|
||||
},
|
||||
workspaceCom(newVal,oldVal){
|
||||
this.workspace = newVal
|
||||
this.upload.gender = newVal.sexEnum.name
|
||||
this.upload.gender = newVal?.sexEnum?.name
|
||||
},
|
||||
moodboarList(newVal,oldVal){
|
||||
if(newVal.length>=1 || this.sketchboardList.length >= 2){
|
||||
|
||||
@@ -131,6 +131,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 取消请求 -->
|
||||
<!-- <button @click="canelAxios">9999999999999999999</button> -->
|
||||
<scaleImage ref="scaleImage"></scaleImage>
|
||||
<Cropper ref="Cropper" @handleCropperSuccess="handleCropperSuccess" @closeCropper="deletUploadFile()" :cropperFileData="cropperFileData" :isUpload="isUpload"></Cropper>
|
||||
</div>
|
||||
@@ -150,6 +152,7 @@ import GO from "@/tool/GO";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { openGuide,driverObj__ } from "@/tool/guide";
|
||||
import scaleImage from "@/component/HomePage/scaleImage.vue";
|
||||
import axios from 'axios'
|
||||
|
||||
export default defineComponent({
|
||||
components:{
|
||||
@@ -238,6 +241,7 @@ export default defineComponent({
|
||||
printboardList:computed(()=>{
|
||||
return useStore().state.UploadFilesModule.printboard
|
||||
}),
|
||||
source:axios.CancelToken.source()
|
||||
|
||||
}
|
||||
},
|
||||
@@ -253,6 +257,12 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
//取消请求测试
|
||||
canelAxios(){
|
||||
// Https.axiosCanel()
|
||||
this.source.cancel('请求被取消');
|
||||
this.source = axios.CancelToken.source()
|
||||
},
|
||||
open(num: Number) {
|
||||
this.openClick = num;
|
||||
let material:any = this.$refs.Material
|
||||
@@ -635,6 +645,8 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
this.loadingShow = true
|
||||
//取消请求
|
||||
// Https.axiosPost(Https.httpUrls.sketchAndPrintGenerate, data,{cancelToken: this.source?.token}).then(
|
||||
Https.axiosPost(Https.httpUrls.sketchAndPrintGenerate, data).then(
|
||||
(rv) => {
|
||||
if(rv){
|
||||
|
||||
@@ -382,7 +382,7 @@ export default defineComponent({
|
||||
watch:{
|
||||
workspaceCom(newVal,oldVal){
|
||||
this.workspace = newVal
|
||||
this.upload.gender = newVal.sexEnum.name
|
||||
this.upload.gender = newVal?.sexEnum?.name
|
||||
},
|
||||
sketchboardList:{
|
||||
handler(newVal:any,oldVal:any){
|
||||
|
||||
Reference in New Issue
Block a user