Files
aida_front/src/component/Detail/DesignDetail.vue

1734 lines
55 KiB
Vue
Raw Normal View History

2023-01-06 16:00:15 +08:00
<template>
<div>
2023-08-23 17:50:09 +08:00
<!-- designDetailShow -->
2023-11-24 16:18:44 +08:00
<a-modal class="design_detail_modal_component Guide_1_18"
2023-11-28 16:21:00 +08:00
:class="[driver__.driver?'hideEvents':'']"
2023-01-06 16:00:15 +08:00
v-model:visible="designDetailShow"
:footer="null"
width="78%"
2023-01-06 16:00:15 +08:00
:maskClosable="false"
:centered="true"
2023-11-28 16:21:00 +08:00
:keyboard="false"
2023-08-23 17:50:09 +08:00
:closable="false"
2023-01-06 16:00:15 +08:00
>
2024-02-27 15:15:38 +08:00
<div class="modal_title_text">
2023-10-30 17:26:36 +08:00
<div>{{ $t('DesignDetail.Details') }}</div>
2024-02-27 15:15:38 +08:00
<div class="modal_title_text_intro">{{ $t('DesignDetail.EditDetails') }}</div>
2023-08-23 17:50:09 +08:00
</div>
2024-01-09 14:10:17 +08:00
<div class="design_closeIcon" @click.stop="closeModal('')">
2023-08-23 17:50:09 +08:00
<i class="fi fi-rr-cross-small"></i>
</div>
2023-01-06 16:00:15 +08:00
<div class="turn_button turn_left_button" v-show="designShowPrview == 1" @click="changeDesignItem('last')"><span class="icon iconfont icon_turn icon-shangyibu"></span></div>
<div class="turn_button turn_right_button" v-show="designShowPrview == 1" @click="changeDesignItem('next')"><span class="icon iconfont icon_turn icon-xiayibu"></span></div>
2023-08-23 17:50:09 +08:00
<!-- <div class="design_centent">
</div> -->
2023-01-06 16:00:15 +08:00
<div class="design_detail_modal_body" v-show="designShowPrview == 1">
2023-08-23 17:50:09 +08:00
2023-09-12 10:11:27 +08:00
<div class="detail_modal_body_img">
2023-08-23 17:50:09 +08:00
<!-- <img class="detial_img" :src="designItemDetail.designItemUrl"> -->
2023-09-25 10:09:00 +08:00
2023-11-24 17:32:57 +08:00
<div v-show="imgDesignImg" class="detail_modal_body">
2024-08-14 16:02:55 +08:00
<div class="detail_modal_body_nav" :style="[(driver__.index == 35|| driver__.index == 36)?'transform: translate(-50%,0%)':'']">
<div v-for="item,index in designItemDetail?.clothes" v-show="item.id" :class="{active:item.clothesOpen,Guide_1_19:(index == 0 && (driver__.index == 35|| driver__.index == 36))}" @click="clothesOpen(index)">
2023-10-12 17:09:05 +08:00
<img :src="item?.path" alt="">
2023-12-12 11:53:02 +08:00
<i v-show="deleteShow" class="fi fi-br-cross" @click.stop="setDelete(index)"></i>
2023-10-12 17:09:05 +08:00
</div>
2023-12-20 10:01:39 +08:00
<div v-show="designItemDetailNum < 5 && !body" class="detail_modal_body_Set" @click="setClothesOpen()">
2023-12-11 10:24:04 +08:00
+
</div>
2023-10-12 17:09:05 +08:00
</div>
2023-12-20 10:01:39 +08:00
<div class="detail_modal_model_content" :class="{active:body}">
2024-05-20 15:10:17 +08:00
<img class="detail_modal_model" :src="designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl" alt="">
2024-05-20 14:45:43 +08:00
<!-- <div class="detail_modal_item_back" :class="{active:body}" v-for="item,index in frontBack.back" :style="item.style">
<img :src="item.imageUrl" alt="">
2024-05-20 14:45:43 +08:00
</div> -->
<!-- <img class="detail_modal_model" :src="frontBack.body?.layersObject[0]?.imageUrl" alt=""> -->
<!-- <div class="detail_modal_item_front Guide_1_19" :class="{active:body}" v-for="item,index in frontBack.front" :style="item.style" @click.stop="clothesOpen(index)">
<img :src="item.imageUrl" alt="">
2024-05-20 14:45:43 +08:00
</div> -->
2023-09-12 10:11:27 +08:00
</div>
2023-09-12 10:11:27 +08:00
</div>
2023-10-11 17:34:14 +08:00
<!-- <div v-else class="detial_img detial_img1" v-for="item,index in frontBack.front" :style="item.style" @click.stop="clothesDetail(item,index)">
<img :src="item.imageUrl" alt="">
</div> -->
2023-10-20 17:21:45 +08:00
<!-- <img v-show="!imgDesignImg" class="detial_img" src="../../assets/images/homePage/111111.png"> -->
2023-09-12 10:11:27 +08:00
<img v-show="!imgDesignImg" class="detial_img" :src="designItemDetail.designItemUrl">
2023-10-11 17:34:14 +08:00
<div class="detail_btn">
2023-08-23 17:50:09 +08:00
<!-- 全屏 -->
2023-09-12 10:11:27 +08:00
<i class="fi fi-bs-expand-arrows-alt" @click="showDesignImgDetail(2)"></i>
2023-08-23 17:50:09 +08:00
<!-- 编辑 -->
2024-09-03 16:39:06 +08:00
<i class="fi fi-rr-edit" :title="$t('DesignDetail.editTitle')" @click="showDesignImgDetail(3)"></i>
2024-07-03 17:32:06 +08:00
<i v-show="!body && !deleteShow" :title="$t('DesignDetail.DetailTitle')" class="fi fi-rr-trash" @click="deleteNav(0)"></i>
2023-12-12 11:53:02 +08:00
<i v-show="!body && deleteShow" class="fi fi-br-check" @click="deleteNav(1)"></i>
2023-08-23 17:50:09 +08:00
<!-- -->
2024-07-03 17:32:06 +08:00
<i class="fi fi-rr-copy" :title="$t('DesignDetail.compareTitle')" @mousedown="mousedownDesignImg" @mouseup="mouseupDesignImg" @touchstart="mousedownDesignImg" @touchend="mouseupDesignImg"></i>
<i v-show="revocationShow>1" class="icon iconfont icon-chehui" @click="revocation"></i>
<i v-show="oppositeRevocationShow>=1" class="icon iconfont icon-fanchehui" @click="oppositeRevocation"></i>
2023-08-23 17:50:09 +08:00
</div>
2023-11-28 16:21:00 +08:00
<div v-show="ifSubmit" class="subitOkPreviewBtn Guide_1_26" @click="submit">
2023-10-30 17:26:36 +08:00
{{ $t('DesignDetail.Submit') }}
2023-10-13 17:06:44 +08:00
</div>
2023-01-06 16:00:15 +08:00
</div>
2023-11-28 16:21:00 +08:00
<div class="detail_modal_body_category">
2023-09-12 10:11:27 +08:00
<div v-show="designOrder" class="detail_modal_right_top scroll_style">
2023-08-23 17:50:09 +08:00
<div class="clothes_detail_item clothes_detail_item_apparel">
<div class="clothes_item_header">
<i class="fi fi-rs-comments"></i>
2023-10-30 17:26:36 +08:00
<div>{{ $t('DesignDetail.CurrentApparel') }}</div>
2023-09-25 10:09:00 +08:00
<i class="fi fi-rr-edit" @click.stop="openCurrent(1)"></i>
2024-07-03 17:32:06 +08:00
<i v-show="current?.id" :title="$t('DesignDetail.editSketchTitle')" class="fi fi-rs-pencil-paintbrush" @click.stop="addDetail"></i>
2023-08-23 17:50:09 +08:00
</div>
2023-12-13 16:36:54 +08:00
<div class="centent_div" v-if="current?.id" @click="openCurrent(1)">
2023-12-12 11:53:02 +08:00
<img :src="current?.path" alt="" class="" @click="openCurrent(1)">
2023-12-11 15:12:53 +08:00
</div>
<i v-else class="fi fi-rr-picture centent clothes_item_icon" @click="openCurrent(1)"></i>
2023-12-11 15:12:53 +08:00
2023-01-06 16:00:15 +08:00
</div>
2024-05-27 17:57:37 +08:00
<div class="clothes_detail_item clothes_detail_item_print" :class="[current?.id?'':'hideCursor']">
2023-08-23 17:50:09 +08:00
<div class="clothes_item_header">
<i class="fi fi-rs-comments"></i>
2023-10-30 17:26:36 +08:00
<div>{{ $t('DesignDetail.CurrentPrint') }}</div>
2023-09-25 10:09:00 +08:00
<i class="fi fi-rr-edit" @click.stop="openCurrent(2)"></i>
2023-08-23 17:50:09 +08:00
</div>
<div class="Guide_1_20 clothes_item_icon" :class="[driver__.driver?'showEvents':'']">
2024-06-17 11:32:31 +08:00
<div class="centent_div centent_print" v-if="exhibitionList.print && exhibitionList.print.length > 1" @click="openCurrent(2)">
<img v-for="item in exhibitionList.print" :key="item.id" :src="item.path" alt="">
2024-06-17 09:39:01 +08:00
</div>
2024-06-20 10:36:45 +08:00
<div v-else-if="exhibitionList.print && exhibitionList.print.length == 1" class="centent_div" @click="openCurrent(2)">
2024-06-17 11:32:31 +08:00
<img :src="exhibitionList.print[0]?.path" alt="">
2023-12-01 17:13:22 +08:00
</div>
<i v-else class="fi fi-rr-picture centent" @click="openCurrent(2)"></i>
2023-09-12 10:11:27 +08:00
</div>
2023-01-06 16:00:15 +08:00
</div>
2024-05-27 17:57:37 +08:00
<div class="clothes_detail_item clothes_detail_item_color" :class="[current?.id?'':'hideCursor']">
2023-08-23 17:50:09 +08:00
<div class="clothes_item_header">
<i class="fi fi-rs-comments"></i>
2023-10-30 17:26:36 +08:00
<div>{{ $t('DesignDetail.CurrentColor') }}</div>
2023-09-25 10:09:00 +08:00
<i class="fi fi-rr-edit" @click.stop="openCurrent(3)"></i>
2023-08-23 17:50:09 +08:00
</div>
2023-09-25 10:09:00 +08:00
<div class="img_block_item centent" @click.stop="openCurrent(3)">
2023-08-23 17:50:09 +08:00
<div class="color_item">
2024-05-16 09:41:16 +08:00
<div v-if="!current?.gradient" class="color_content" :style="{background:`rgba(${current?.color?.r},${current?.color?.g},${current?.color?.b},${current?.color?.a?current?.color.a:1})`}"></div>
<div class="color_content" v-else :style="{height:'10rem','background-image':current?.gradient?`linear-gradient(${current?.gradient.angle}deg,${setGradient(current?.gradient)}`:'none'}"></div>
<div v-if="!current?.gradient" class="color_content_body">
2023-12-12 11:53:02 +08:00
<div class="color_des">{{current?.color?.tcx}}</div>
<div class="color_des">{{current?.color?.name}}</div>
2023-08-23 17:50:09 +08:00
</div>
</div>
</div>
</div>
2024-06-17 09:39:01 +08:00
<div class="clothes_detail_item clothes_detail_item_elements" :class="[current?.id?'':'hideCursor']">
<div class="clothes_item_header">
<i class="fi fi-rs-comments"></i>
2024-09-13 21:26:17 +08:00
<div>{{ $t('DesignDetail.CurrentElements') }}</div>
2024-06-17 09:39:01 +08:00
<i class="fi fi-rr-edit" @click.stop="openCurrent(4)"></i>
</div>
<div class="Guide_1_20 clothes_item_icon" :class="[driver__.driver?'showEvents':'']">
2024-06-17 11:32:31 +08:00
<div class="centent_div centent_print" v-if="exhibitionList.elements && exhibitionList.elements.length > 1" @click="openCurrent(4)">
<img v-for="item in exhibitionList.elements" :key="item.id" :src="item.path" alt="">
</div>
2024-06-20 10:36:45 +08:00
<div v-else-if="exhibitionList.elements && exhibitionList.elements.length == 1" class="centent_div" @click="openCurrent(4)">
2024-06-17 11:32:31 +08:00
<img :src="exhibitionList.elements[0]?.path" alt="">
</div>
<i v-else class="fi fi-rr-picture centent" @click="openCurrent(4)"></i>
2024-06-17 09:39:01 +08:00
</div>
</div>
2023-01-06 16:00:15 +08:00
</div>
</div>
2023-08-23 17:50:09 +08:00
<DesignDetailAlter ref="DesignDetailAlter"></DesignDetailAlter>
2023-01-06 16:00:15 +08:00
2023-08-23 17:50:09 +08:00
</div>
2023-01-06 16:00:15 +08:00
<div class="design_detail_perview" v-show="designShowPrview == 2">
<div class="design_detail_perview_content" >
2023-10-20 17:21:45 +08:00
<magnifyingGlass ref="magnifyingGlass" :designItemDetailUrl='designItemDetailUrl'></magnifyingGlass>
<!-- <img class="perview_img" v-lazy="designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl || ''" :key="designItemDetail.designItemUrl"> -->
2023-01-06 16:00:15 +08:00
<!-- <div class="generate_button" v-show="designItemDetail.singleOverall == 'overall'" @click="generateHighDesign()">Generate Product lmage</div> -->
</div>
</div>
2023-09-12 10:11:27 +08:00
<div class="design_detail_perview" v-show="designShowPrview == 3">
2023-11-27 16:25:32 +08:00
2023-01-06 16:00:15 +08:00
<div class="design_detail_perview_content" >
2023-09-12 10:11:27 +08:00
<!-- <div class="generate_button" v-show="designItemDetail.singleOverall == 'overall'" @click="generateHighDesign()">Generate Product lmage</div> -->
<setDesignItem ref="setDesignItem" :isBody="body" @setParentLoadingShow=setParentLoadingShow @setDesignCoverage="setDesignCoverage" @setSubmit="setSubmit"></setDesignItem>
2024-09-06 13:48:16 +08:00
<!-- <setDesignItemMobile v-else ref="setDesignItemMobile" @setParentLoadingShow=setParentLoadingShow @setDesignCoverage="setDesignCoverage" @setSubmit="setSubmit"></setDesignItemMobile> -->
2023-01-06 16:00:15 +08:00
</div>
2023-09-12 10:11:27 +08:00
2023-01-06 16:00:15 +08:00
</div>
2024-06-17 09:39:01 +08:00
<addDetails ref="addDetails" @setSloganData="setSloganData"></addDetails>
2023-01-06 16:00:15 +08:00
</a-modal>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" />
</div>
</div>
</template>
<script lang="ts">
2024-01-04 09:40:28 +08:00
import { defineComponent,computed,ref,provide,nextTick,createVNode} from 'vue'
2023-08-23 17:50:09 +08:00
import DesignDetailAlter from '@/component/Detail/DesignDetailAlter.vue'
2023-10-20 17:21:45 +08:00
import magnifyingGlass from '@/component/Detail/magnifyingGlass.vue'
2024-02-23 14:32:33 +08:00
import setDesignItem from '@/component/Detail/setDesignItem.vue'
// import setDesignItem from '@/component/Detail/setDesignItem2.vue'
2023-11-27 16:25:32 +08:00
import setDesignItemMobile from '@/component/Detail/setDesignItemMobile.vue'
2023-01-06 16:00:15 +08:00
import Draggable from 'vuedraggable'
2024-01-04 09:40:28 +08:00
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
2023-01-06 16:00:15 +08:00
import { Https } from "@/tool/https";
2024-01-04 09:40:28 +08:00
import { Modal,message } from 'ant-design-vue';
2024-05-16 09:41:16 +08:00
import {getUploadUrl,isMoible,setGradual} from '@/tool/util'
2023-01-06 16:00:15 +08:00
import { useStore } from "vuex";
2023-11-24 16:18:44 +08:00
import { openGuide,driverObj__ } from "@/tool/guide";
2023-10-11 17:34:14 +08:00
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
2023-10-30 17:26:36 +08:00
import { useI18n } from 'vue-i18n'
2024-06-17 09:39:01 +08:00
import addDetails from '@/component/Detail/addDetails.vue'
2023-01-06 16:00:15 +08:00
export default defineComponent({
components:{
Draggable,
2023-09-12 10:11:27 +08:00
DesignDetailAlter,
setDesignItem,
2023-10-20 17:21:45 +08:00
magnifyingGlass,
2023-11-27 16:25:32 +08:00
setDesignItemMobile,
2024-06-17 09:39:01 +08:00
addDetails,
2023-01-06 16:00:15 +08:00
},
setup() {
const store = useStore();
2023-09-25 10:09:00 +08:00
// let designItemDetail :any = computed(()=>{
// return store.state.DesignDetailModule.designItemDetail
// })
let designItemDetail :any = computed(()=>{
2023-09-12 10:11:27 +08:00
return store.state.DesignDetailModule.designItemDetail
})
2023-01-06 16:00:15 +08:00
let parentData:any = ref({
design:{},
index:0,
collectionList:[],
type:'',
2023-08-23 17:50:09 +08:00
2023-01-06 16:00:15 +08:00
})//父组件传过来的数据
2023-09-12 10:11:27 +08:00
let others:any = ref({
left:200+'px',
top:100+'px',
})
2023-09-25 10:09:00 +08:00
let currentIndex:any = ref(0)
2023-09-12 10:11:27 +08:00
let current:any = ref({})//点击上衣或者下衣
provide('current',current)
2023-12-20 17:03:42 +08:00
provide('designItemDetail',designItemDetail)
provide('currentIndex',currentIndex)
2023-09-25 10:09:00 +08:00
let frontBack:any = ref({})
2023-10-11 17:34:14 +08:00
let body = ref(false)
let designItemId = ref()
let designOutfitId = ref()
let userInfo:any = {}
2023-10-13 17:06:44 +08:00
let ifSubmit = ref(false)
2023-10-20 17:21:45 +08:00
let designItemDetailUrl = ref({})
let setRevocationShow = ref(false)//判断是不是第一次进来和切换下一张
let oppositeRevocationShow:any = ref()
let revocationShow:any = ref()
2023-11-24 16:18:44 +08:00
let driver__:any = computed(()=>{
return store.state.Guide.guide
})
provide('driver__',driver__)
2023-12-20 17:03:42 +08:00
provide('body',body)
2023-11-27 16:25:32 +08:00
let moible:any = isMoible()
2023-12-01 17:13:22 +08:00
provide('moible',moible)
2024-06-17 11:32:31 +08:00
let exhibitionList:any = ref({
2024-06-17 09:39:01 +08:00
print:[],
elements:[],
})
provide('exhibitionList',exhibitionList)
2023-10-30 17:26:36 +08:00
let {t} = useI18n()
2023-12-11 14:30:16 +08:00
//创建单件衣服
let setClothes:any = ref()
2023-12-12 11:53:02 +08:00
//点击删除按钮
let deleteShow:any = ref(false)
2023-12-13 17:15:02 +08:00
let deleteItemShow:any = ref(false)
2023-12-13 16:09:17 +08:00
let designItemDetailNum:any = ref(0)
2023-01-06 16:00:15 +08:00
return{
designItemDetail,
store,
2023-08-23 17:50:09 +08:00
parentData,
2023-09-12 10:11:27 +08:00
others,
2023-09-25 10:09:00 +08:00
currentIndex,
2023-09-12 10:11:27 +08:00
current,
2023-09-25 10:09:00 +08:00
frontBack,
2023-10-11 17:34:14 +08:00
body,
designItemId,
designOutfitId,
2023-10-13 17:06:44 +08:00
userInfo,
2023-10-20 17:21:45 +08:00
ifSubmit,
designItemDetailUrl,
setRevocationShow,
oppositeRevocationShow,
2023-10-30 17:26:36 +08:00
revocationShow,
2023-11-24 16:18:44 +08:00
driver__,
2023-11-27 16:25:32 +08:00
moible,
2024-06-17 09:39:01 +08:00
exhibitionList,
2023-10-30 17:26:36 +08:00
t,
2023-12-11 14:30:16 +08:00
setClothes,
2023-12-12 11:53:02 +08:00
deleteShow,
2023-12-13 17:15:02 +08:00
deleteItemShow,
2023-12-13 16:09:17 +08:00
designItemDetailNum,
2023-01-06 16:00:15 +08:00
}
},
data(){
return{
2023-09-12 10:11:27 +08:00
loadingShow:false,//加载中
2023-09-25 10:09:00 +08:00
designDetailShow:false,
2023-01-06 16:00:15 +08:00
designShowPrview:1, //展示图片预览步骤
generateHighDesignImg:'',//点击generate按钮生成的高级设计图
2023-09-12 10:11:27 +08:00
imgDesignImg:true,
designOrder:false,
2023-01-06 16:00:15 +08:00
}
},
2024-05-16 09:41:16 +08:00
computed:{
setGradient(){
2024-05-16 10:37:49 +08:00
return (gradient:any)=>{
2024-05-16 09:41:16 +08:00
let gradientStr = ''
2024-05-16 10:37:49 +08:00
gradient.gradientList.sort((a:any, b:any) => {
2024-05-16 09:41:16 +08:00
let aArr = a.left.split('%')[0]
let bArr = b.left.split('%')[0]
return aArr - bArr;
});
2024-05-16 10:37:49 +08:00
gradient.gradientList.forEach((item:any,index:any)=>{
2024-05-16 09:41:16 +08:00
let str = ','
if(gradient.gradientList.length == index+1)str = ''
gradientStr += `rgba(${item.rgba.r},${item.rgba.g},${item.rgba.b},${item.rgba.a}) ${item.left}${str}`
})
return `${gradientStr}`
}
},
},
2023-09-25 10:09:00 +08:00
watch:{
designItemDetail:{
2023-10-20 17:21:45 +08:00
handler: async function(newVal,oldVal) {
2024-05-28 11:22:16 +08:00
2023-09-25 10:09:00 +08:00
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
2023-10-13 17:06:44 +08:00
this.ifSubmit = designItemDetail.ifSubmit?designItemDetail.ifSubmit:false
2023-12-15 11:10:32 +08:00
if(newVal.clothes.length == 0){
this.current = ''
}else{
if(newVal.clothes.length-1 < this.currentIndex){
this.currentIndex = newVal.clothes.length-1
}
2023-12-15 11:10:32 +08:00
this.current = JSON?.parse(JSON?.stringify(designItemDetail?.clothes?.[this?.currentIndex]))
}
2024-03-28 13:44:05 +08:00
// if(designItemDetail.others?.[0]?.layersObject?.length != 0){
// this.body = false
// }else{
// this.body = true
// }
if(designItemDetail.singleOverall == 'overall'){
this.body = false
}else{
this.body = true
}
2023-12-13 16:09:17 +08:00
let num = 0
newVal.clothes.forEach((item:any) => {
if(item.id){
num++
}
});
2023-12-13 16:09:17 +08:00
this.designItemDetailNum = num
2023-10-20 17:21:45 +08:00
await this.setImgSize()
2023-12-13 16:09:17 +08:00
let url = ''
if(designItemDetail.currentFullBodyView){
url = designItemDetail.currentFullBodyView
}else{
url = designItemDetail.designItemUrl
}
this.designItemDetailUrl = url
// console.log(designItemDetail.currentFullBodyView,designItemDetail.designItemUrl);
2023-09-25 10:09:00 +08:00
}
},
2023-11-02 11:00:38 +08:00
designDetailShow:{
handler: function(newval) {
2023-11-08 13:01:45 +08:00
// this.removeRevocation()
2023-11-02 11:00:38 +08:00
}
2024-06-17 09:39:01 +08:00
},
'current.printObject.prints':{
handler(newVal,oldVal){
if(newVal && newVal.length > 0){
this.exhibitionList.print = this.setExhibitionList(newVal)
2024-06-20 10:36:45 +08:00
}else{
this.exhibitionList.print = []
2024-06-17 09:39:01 +08:00
}
}
},
'current.trims.prints':{
handler(newVal,oldVal){
if(newVal && newVal.length > 0){
this.exhibitionList.elements = this.setExhibitionList(newVal)
2024-06-20 10:36:45 +08:00
}else{
2024-06-24 16:45:20 +08:00
this.exhibitionList.elements = []
2024-06-17 09:39:01 +08:00
}
}
},
2023-09-25 10:09:00 +08:00
},
provide() {
return {
setRevocation:this.setRevocation
}
},
2023-09-12 10:11:27 +08:00
mounted(){
let beforeunload = () => {
this.removeRevocation()
window.removeEventListener('beforeunload',beforeunload)
}
window.addEventListener('beforeunload',beforeunload)
2023-10-11 17:34:14 +08:00
let userInfo:any = getCookie("userInfo")
this.userInfo = JSON.parse(userInfo);
// let url = Https.httpUrls.getDesignDetail + `?designItemId=34242&designPythonOutfitId=34004`
// this.loadingShow = true
// Https.axiosGet(url).then(
// async (rv: any) => {
// rv.clothes.forEach((item:any)=>{
// let a
// if(item.layersObject[0].imageCategory.indexOf("back") == -1){
// a = item.layersObject[0]
// item.layersObject[0] = item.layersObject[1]
// item.layersObject[1] = a
// }
// if(item.printObject.prints == null){
// item.printObject.prints = [{}]
// }
// })
// this.store.commit('setDesignItemDetail',rv)
// if(rv.others[0].printObject.path == null){
// this.body = false
// }else{
// this.body = true
// }
// this.setImgSize()
// this.generateHighDesignImg = rv.highDesignUrl
// this.designShowPrview = 1
// this.designDetailShow = true
// this.loadingShow = false
// }
// ).catch(rv=>{
// this.loadingShow = false
// })
2023-09-12 10:11:27 +08:00
},
2023-01-06 16:00:15 +08:00
methods:{
2023-08-23 17:50:09 +08:00
openCurrent(num: Number) {
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
2023-12-13 16:36:54 +08:00
if(num == 2 || num == 3){
if(!this.current.id){
return
}
}
2023-08-23 17:50:09 +08:00
DesignDetailAlter.init(num)
if(num ==2 ){
2023-11-28 16:21:00 +08:00
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
2023-08-23 17:50:09 +08:00
}
},
2024-06-17 09:39:01 +08:00
addDetail(){
let addDetails:any = this.$refs.addDetails
addDetails.init(this.current,this.currentIndex)
},
2024-01-09 14:10:17 +08:00
closeModal(submit:any){
2023-01-06 16:00:15 +08:00
if(this.designShowPrview == 1){
2024-01-09 14:10:17 +08:00
if(this.ifSubmit && submit == ''){
2024-01-04 09:40:28 +08:00
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 = {}
2024-09-06 13:48:16 +08:00
let setDesignItem:any = this.$refs.setDesignItem
// let setDesignItem:any = isMoible() ? this.$refs.setDesignItemMobile : this.$refs.setDesignItem
2024-08-13 09:36:13 +08:00
setDesignItem.clear()
2024-01-04 09:40:28 +08:00
}
2023-09-12 10:11:27 +08:00
}else{
2023-10-20 17:21:45 +08:00
this.designShowPrview = 1;
2024-09-03 16:39:06 +08:00
this.frontBack = {}
2024-09-06 13:48:16 +08:00
let setDesignItem:any = this.$refs.setDesignItem
2024-09-03 16:39:06 +08:00
setDesignItem.clear()
2023-12-01 15:02:37 +08:00
// this.designItemDetailUrl = {}
2023-01-06 16:00:15 +08:00
}
},
2024-06-17 09:39:01 +08:00
//切换当前展示的是印花还是elements
setExhibitionList(arr:any){
const seen = new Map();
return arr.filter((obj:any, index:any, self:any) => {
const key = obj.minIOPath; // 替换成你想要去重的属性名
if (seen.has(key)) {
return false;
} else {
seen.set(key, true);
return true;
}
});
},
2023-10-11 17:34:14 +08:00
showDesignDetailModal(data:any,str:string){
2023-12-01 17:13:22 +08:00
this.moible = isMoible()
2023-10-11 17:34:14 +08:00
this.designItemId = data.design.designItemId
this.designOutfitId = data.design.designOutfitId
2023-12-13 17:35:52 +08:00
let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}`
2024-06-24 16:45:20 +08:00
// let url = Https.httpUrls.getDesignDetail + `?designItemId=61204&designPythonOutfitId=60908`
2023-01-06 16:00:15 +08:00
this.parentData = data
this.loadingShow = true
Https.axiosGet(url).then(
2023-12-01 17:13:22 +08:00
async (rv: any) => {
2023-10-11 17:34:14 +08:00
rv.clothes.forEach((item:any)=>{
let a
item.designType='Library'
2023-10-11 17:34:14 +08:00
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
a = item.layersObject[0]
item.layersObject[0] = item.layersObject[1]
item.layersObject[1] = a
}
if(item.printObject.prints == null)item.printObject.prints = []
item.printObject.prints.forEach((element:any) => {
if(!element.designType){
element.designType = 'Library'
}
});
2023-10-11 17:34:14 +08:00
})
2023-12-13 16:09:17 +08:00
this.currentIndex = 0
2023-10-11 17:34:14 +08:00
this.store.commit('setDesignItemDetail',rv)
2023-11-08 13:01:45 +08:00
this.removeRevocation()
2024-04-15 16:09:33 +08:00
this.deleteShow = false
this.setRevocation(rv,'')
2024-03-28 13:44:05 +08:00
// if(rv.others[0].layersObject.length != 0){
// this.body = false
// }else{
// this.body = true
// }
if(rv.singleOverall == 'overall'){
2023-10-11 17:34:14 +08:00
this.body = false
}else{
this.body = true
}
2023-12-01 17:13:22 +08:00
if(str == 'setDesignItem'){
2023-10-11 17:34:14 +08:00
}else{
this.designShowPrview = 1
}
// await this.setImgSize()
2023-01-06 16:00:15 +08:00
this.generateHighDesignImg = rv.highDesignUrl
this.designDetailShow = true
this.loadingShow = false
await this.setImgSize()
2023-11-24 16:18:44 +08:00
if(this.driver__.driver){
2024-01-10 17:40:11 +08:00
nextTick().then(()=>{
2023-12-01 17:13:22 +08:00
// driverObj__.moveNext();
2024-08-14 16:02:55 +08:00
driverObj__.moveTo(36);
2023-11-24 16:18:44 +08:00
})
}
2023-01-06 16:00:15 +08:00
}
2023-11-24 16:18:44 +08:00
2023-01-06 16:00:15 +08:00
).catch(rv=>{
this.loadingShow = false
})
2023-11-24 16:18:44 +08:00
2023-01-06 16:00:15 +08:00
},
2023-09-25 10:09:00 +08:00
async setImgSize(){
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
let front:any = []
let back:any = []
let body:any
2023-10-11 17:34:14 +08:00
if(this.body){
designItemDetail.clothes.forEach((v:any,index:number)=>{
let zIndex = 3
for (let i = v.layersObject.length-1; i >= 0; i--) {
if(v.layersObject[i].imageCategory.indexOf("back") == -1){
front[index] = v.layersObject[i]
}else{
back[index] = v.layersObject[i]
}
}
})
}else{
designItemDetail?.others?.forEach((item:any) => {
2023-10-11 17:34:14 +08:00
if(item.type == 'Body'){
body = item
this.frontBack.body = item
2023-09-25 10:09:00 +08:00
}
2023-10-11 17:34:14 +08:00
});
2023-10-30 10:03:49 +08:00
let ratio:any = await this?.setPostition(body?.layersObject?.[0]?.imageUrl)
if(Number.isNaN(ratio) || ratio == 0){
2023-12-13 16:36:54 +08:00
this.setImgSize()
return
2023-12-13 16:36:54 +08:00
}
2023-10-11 17:34:14 +08:00
let frontIndex = 6
let backIndex = 3
designItemDetail.clothes.forEach((v:any,index:any)=>{
for (let i = v.layersObject.length-1; i >= 0; i--) {
v.layersObject[i].style = {
top:v.layersObject[i].position?.[0]*ratio+'px',
left:v.layersObject[i].position?.[1]*ratio+'px',
width:v.layersObject[i].imageSize?.[0]*ratio+'px',
height:v.layersObject[i].imageSize?.[1]*ratio+'px',
}
v.layersObject[i].centers={
left:0,
top:0,
}
v.layersObject[i].designOpenrtionBtn = false
if(v.layersObject[i].imageCategory.indexOf("back") == -1){
front[index] = v.layersObject[i]
2023-12-13 16:09:17 +08:00
front[index].style.zIndex = v.priority
2023-10-11 17:34:14 +08:00
}else{
back[index] = v.layersObject[i]
2023-12-13 16:09:17 +08:00
back[index].style.zIndex = v.priority
2023-10-11 17:34:14 +08:00
// back[index].style.zIndex = backIndex==0?v.layersObject[i]:backIndex++
}
2023-09-25 10:09:00 +08:00
}
2023-10-11 17:34:14 +08:00
})
body.style = {
width:body.layersObject[0].imageSize?.[0]*ratio+'px',
height:body.layersObject[0].imageSize?.[1]*ratio+'px',
2023-09-25 10:09:00 +08:00
}
2023-10-11 17:34:14 +08:00
}
2023-11-06 15:19:52 +08:00
let onresizeTime:any
let this_ = this
this.frontBack = {
front:front,
back:back,
body:body,
}
await new Promise((resolve, reject) => {
nextTick().then(()=>{
resolve('')
})
});
2023-11-06 15:19:52 +08:00
window.onresize = () => {
return (() => {
clearTimeout(onresizeTime)
onresizeTime = setTimeout(async ()=>{
await this_.setImgSize()
2023-12-01 17:13:22 +08:00
2023-11-06 15:19:52 +08:00
},500)
})()
}
2024-01-10 17:40:11 +08:00
2024-04-26 17:36:30 +08:00
},
setParentLoadingShow(){
this.loadingShow=false
2023-09-25 10:09:00 +08:00
},
2023-10-11 17:34:14 +08:00
setDesignCoverage(str:string){
let {design,index,collectionList} = this.parentData
let newIndex = 0
let newDesign = {}
collectionList.forEach((item:any,index:number) => {
if(item.designItemId === this.designItemId){
newIndex = index
}
});
newDesign = collectionList[newIndex]
newIndex = this.parentData.index
let data = {
design:newDesign,
index:newIndex,
collectionList:collectionList
}
this.designShowPrview = 1
// this.showDesignDetailModal(data,str)
2023-11-02 11:00:38 +08:00
this.loadingShow = false
2023-12-28 17:00:39 +08:00
this.clearSelect()
2023-10-11 17:34:14 +08:00
},
removeRevocation(){
sessionStorage.removeItem('oppositeRevocation')
sessionStorage.removeItem('revocation')
this.setRevocationShow = false
},
setRevocation(designItemDetail:any,data:any){//设置撤销
let itemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
// let data = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designPreviewData))
2023-11-08 13:01:45 +08:00
let revocation:any = JSON.parse((sessionStorage.getItem("revocation") as any))
let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
2023-11-08 13:01:45 +08:00
if(revocation?.[0]?.designItemDetail.designItemId != itemDetail.designItemId || revocation?.[0]?.designItemDetail.designItemId == undefined){
// sessionStorage.setItem('revocation', JSON.stringify([]));
// sessionStorage.setItem('oppositeRevocation',JSON.stringify([]));
revocation = []
}
let detail = {
designItemDetail:designItemDetail,
data:data?data:''
}
revocation.push(detail)
2023-11-08 13:01:45 +08:00
this.revocationShow = revocation?.length
this.oppositeRevocationShow = 0
sessionStorage.setItem('revocation', JSON.stringify(revocation));
sessionStorage.setItem('oppositeRevocation',JSON.stringify([]));
},
clearSelect(){//清除选中
this.designOrder = false
this.designItemDetail.clothes.forEach((item:any)=>{
item.clothesOpen = false
})
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.changePlace()
DesignDetailAlter.terminate()
},
revocation(){//撤回
let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
let revocation = JSON.parse((sessionStorage.getItem("revocation") as any))
oppositeRevocation.push(revocation[revocation.length-1])
this.oppositeRevocationShow = oppositeRevocation.length
revocation.splice(revocation.length-1,1)
this.revocationShow = revocation.length
if(this.revocationShow > 1){
this.store.commit('setDesignPreviewData',revocation[revocation.length-1].data)
}
this.store.commit("setDesignItemDetail", revocation[revocation.length-1].designItemDetail);
sessionStorage.setItem('oppositeRevocation', JSON.stringify(oppositeRevocation));
sessionStorage.setItem('revocation', JSON.stringify(revocation));
this.clearSelect()
},
oppositeRevocation(){//反撤回
let oppositeRevocation = JSON.parse((sessionStorage.getItem("oppositeRevocation") as any))
let revocation = JSON.parse((sessionStorage.getItem("revocation") as any))
this.store.commit('setDesignPreviewData',oppositeRevocation[oppositeRevocation.length-1].data)
this.store.commit("setDesignItemDetail", oppositeRevocation[oppositeRevocation.length-1].designItemDetail);
revocation.push(oppositeRevocation[oppositeRevocation.length-1])
this.revocationShow = revocation.length
oppositeRevocation.splice(oppositeRevocation.length-1,1)
this.oppositeRevocationShow = oppositeRevocation.length
sessionStorage.setItem('oppositeRevocation', JSON.stringify(oppositeRevocation));
sessionStorage.setItem('revocation', JSON.stringify(revocation));
this.clearSelect()
},
2023-12-13 16:09:17 +08:00
setSubmitItem(str:any,sub:any){
//sub判断是不是点击新增图层又直接点击删除
2023-09-25 10:09:00 +08:00
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
let clothes:any = []
2023-12-13 16:09:17 +08:00
let num = -1
// let zIndex = 10
designItemDetail.clothes.forEach((item:any,index:number) => {
2024-05-16 09:41:16 +08:00
let clothesItem:any = {
2023-09-26 15:05:14 +08:00
color: `${item.color.r} ${item.color.g} ${item.color.b}`,
2023-09-25 10:09:00 +08:00
id:item.id,
2023-10-11 17:34:14 +08:00
path:item.minIOPath,
2024-05-16 09:41:16 +08:00
gradient:{},
2024-06-17 09:39:01 +08:00
trims:item.trims,
sketchString:item.sketchString,
changed:item.changed?item.changed:false,
designType:item.designType?item.designType:"Library",
2023-12-12 11:53:02 +08:00
offset:item.layersObject?.[1]?.offset == null?[0,0]:item.layersObject[1].offset,
2024-10-10 11:32:49 +08:00
maskMinioUrl:item.layersObject[1]?.maskMinioUrl?item.layersObject[1].maskMinioUrl:'',
maskUrl:item.layersObject?.[1]?.maskUrl?item.layersObject[1].maskUrl:'',
2024-05-27 17:57:37 +08:00
scale:item.layersObject?.[1]?.scale?item.layersObject[1].scale:[1,1],
2023-09-25 10:09:00 +08:00
printObject:{
2023-10-11 17:34:14 +08:00
// path:item.printObject.path?item.printObject.path :'',
prints:item?.printObject?.prints[0]?.minIOPath?item?.printObject?.prints:[]
2023-09-25 10:09:00 +08:00
},
2024-07-09 19:10:01 +08:00
undividedLayer:item?.undividedLayer,
2023-12-13 16:09:17 +08:00
priority:item.priority,
2023-09-25 10:09:00 +08:00
type:item.type,
}
2024-05-16 09:41:16 +08:00
if(item.gradient){
let gradient = item.gradient
gradient.colorImg = setGradual(item.gradient,320,700)
clothesItem.gradient = item.gradient
}else{
delete clothesItem.gradient
}
2023-12-13 16:09:17 +08:00
if(!item.id && sub){
num = index
}else{
clothes.push(clothesItem)
}
2023-09-25 10:09:00 +08:00
});
2023-12-13 16:09:17 +08:00
if(num != -1){
designItemDetail.clothes.splice(num,1)
this.store.commit("setDesignItemDetail", designItemDetail);
}
this.currentIndex = 0
let workspace = this.store.state.Workspace.workspace
2023-09-25 10:09:00 +08:00
let data = {
designItemId:designItemDetail.designItemId,
// designItemId:designItemDetail.designItemId,
gender:workspace?.sex,
2023-09-25 10:09:00 +08:00
designSingleItemDTOList:clothes,
isPreview:false,
2024-06-17 09:39:01 +08:00
sketchString:'',
2023-10-13 17:06:44 +08:00
ifSubmit:designItemDetail.isPreview,
2023-10-11 17:34:14 +08:00
processId:String(this.userInfo?.userId),
2023-09-25 10:09:00 +08:00
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
}
2023-10-11 17:34:14 +08:00
if(str == 'preview'){
data.isPreview = true
}else{
data.isPreview = false
2023-10-13 17:06:44 +08:00
delete data.ifSubmit
2023-10-11 17:34:14 +08:00
}
return data
},
2023-11-02 11:00:38 +08:00
async setSubmit(str:any){
2024-09-06 13:48:16 +08:00
let setDesignItem:any = this.$refs.setDesignItem
2023-12-13 16:09:17 +08:00
let data = this.setSubmitItem(str,true)
2023-11-02 11:00:38 +08:00
this.loadingShow = true
await setDesignItem.setPreview(data)
2023-10-11 17:34:14 +08:00
},
async submit(){
2023-12-13 16:09:17 +08:00
let data = this.setSubmitItem('',true)
2023-09-25 10:09:00 +08:00
this.loadingShow = true
Https.axiosPost(Https.httpUrls.designSingle, data).then(
(rv: any) => {
this.loadingShow = false
let designCollectionList = this.store.state.HomeStoreModule.designCollectionList
2023-10-11 17:34:14 +08:00
let likeDesignCollectionList = this.store.state.HomeStoreModule.likeDesignCollectionList
2023-09-25 10:09:00 +08:00
designCollectionList.forEach((item:any) => {
if(item.designItemId == rv.designItemId){
item.designOutfitUrl = rv.designItemUrl
}
});
2023-10-11 17:34:14 +08:00
likeDesignCollectionList.forEach((item:any) => {
if(item.designItemId == rv.designItemId){
item.designOutfitUrl = rv.designItemUrl
}
});
2024-01-09 14:10:17 +08:00
this.closeModal('submit')
2023-09-25 10:09:00 +08:00
this.store.commit('setDesignCollectionList',designCollectionList)
2023-10-11 17:34:14 +08:00
this.store.commit('setLikeDesignCollectionList',likeDesignCollectionList)
2023-11-28 16:21:00 +08:00
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
2023-09-25 10:09:00 +08:00
}
).catch(res=>{
this.loadingShow = false
});
},
//按比设置单件衣服宽高位置
async setPostition(url:any){
2023-12-12 11:53:02 +08:00
let num:any
await nextTick().then(async ()=>{
let modal_body:any= document.getElementsByClassName('detail_modal_model')[0]
let imgWidth:any
await new Promise((resolve, reject) => {
2023-09-25 10:09:00 +08:00
const img = new Image();
img.onload = () => {
imgWidth = img.width
2023-09-25 10:09:00 +08:00
resolve(img)
2024-06-17 09:39:01 +08:00
img.remove()
2023-09-25 10:09:00 +08:00
};
img.onerror = reject;
img.src = url;
});
// await loadImage(url).then((img:any)=>{
// console.log(2);
// // modal_body = document.getElementsByClassName('detail_modal_model')[0]
// if(modal_body == undefined){
// this.setPostition(url)
// }
// console.log( modal_body?.offsetWidth,imgWidth, img.width);
// return num
// })
num = modal_body?.offsetWidth / imgWidth;
})
2023-09-25 10:09:00 +08:00
return num
},
2023-01-06 16:00:15 +08:00
//切换上一张或下一张图的详情
changeDesignItem(type:string){
let {design,index,collectionList} = this.parentData
let newDesign = {}
let newIndex = 0
2023-09-25 10:09:00 +08:00
this.designOrder = false
this.removeRevocation()
2023-09-25 10:09:00 +08:00
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.terminate()
2023-01-06 16:00:15 +08:00
if(type === 'last'){
if(index>0){
newIndex = this.parentData.index - 1
}else{
newIndex = this.parentData.collectionList.length - 1
}
}else{
if(index < this.parentData.collectionList.length - 1){
newIndex = this.parentData.index + 1
}else{
newIndex = 0
}
}
newDesign = collectionList[newIndex]
let data = {
design:newDesign,
index:newIndex,
collectionList:collectionList
}
2023-10-11 17:34:14 +08:00
this.showDesignDetailModal(data,'')
2023-01-06 16:00:15 +08:00
},
//显示图片详情
2023-09-12 10:11:27 +08:00
showDesignImgDetail(num:any){
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
this.designShowPrview = num
2024-09-06 13:48:16 +08:00
let setDesignItem:any = this.$refs.setDesignItem
2023-09-12 10:11:27 +08:00
if(this.designShowPrview == 3){
2024-02-22 13:25:56 +08:00
setDesignItem.setImgSize()
2024-03-28 13:44:05 +08:00
}else if(this.designShowPrview == 2){
let magnifyingGlass:any = this.$refs.magnifyingGlass
// magnifyingGlass.showGlass = true
magnifyingGlass.imageUrl = this.designItemDetailUrl
2023-09-12 10:11:27 +08:00
}
// this.others = designItemDetail.others
// if(this.generateHighDesignImg){
// this.designShowPrview = 3
// }else{
// this.designShowPrview = 2
// }
2023-01-06 16:00:15 +08:00
},
2023-12-12 11:53:02 +08:00
deleteNav(num:number){
if(num == 0){
this.deleteShow = true
this.designItemDetail.clothes.forEach((item:any)=>{
item.clothesOpen = false
})
this.designOrder = false
2023-12-13 17:15:02 +08:00
2023-12-12 11:53:02 +08:00
}else{
this.deleteShow = false
2024-05-27 17:57:37 +08:00
2023-12-13 17:15:02 +08:00
let data:any = this.setSubmitItem('preview',true)
if(!this.deleteItemShow){
return
}
2024-06-17 09:39:01 +08:00
this.setDesignSingle(data)
2023-12-12 11:53:02 +08:00
}
2023-12-13 17:15:02 +08:00
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.changePlace()
DesignDetailAlter.terminate()
2023-12-12 11:53:02 +08:00
},
2024-06-17 09:39:01 +08:00
setDesignSingle(data:any){
this.loadingShow = true
let designItemDetail = JSON.parse(JSON.stringify(this.designItemDetail))
Https.axiosPost(Https.httpUrls.designSingle, data).then(
(rv) => {
// this.current.minIOPath = rv.clothes[this.currentIndex].minIOPath
designItemDetail.clothes[this.currentIndex].minIOPath = rv.clothes[this.currentIndex].minIOPath
this.current.path = rv.clothes[this.currentIndex].minIOPath
designItemDetail.clothes[this.currentIndex].path = rv.clothes[this.currentIndex].path
2024-09-03 16:39:06 +08:00
designItemDetail.clothes[this.currentIndex].layersObject = rv.clothes[this.currentIndex].layersObject
2024-06-17 09:39:01 +08:00
designItemDetail.clothes[this.currentIndex].sketchString = ''
data.designSingleItemDTOList[this.currentIndex].sketchString =''
data.designSingleItemDTOList[this.currentIndex].path =rv.clothes[this.currentIndex].minIOPath
designItemDetail.currentFullBodyView = rv.currentFullBodyView
designItemDetail.ifSubmit = true
this.loadingShow = false
// if(this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1] && !this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1].id){
// this.designItemDetail.clothes.split(this.designItemDetail.clothes.legnth-1,1)
// }
if(data.designSingleItemDTOList[data.designSingleItemDTOList.legnth-1] && !data.designSingleItemDTOList[data.designSingleItemDTOList.legnth-1].id){
data.designSingleItemDTOList.split(data.designSingleItemDTOList.legnth-1,1)
}
this.store.commit("setDesignItemDetail", designItemDetail);
this.store.commit("setDesignPreviewData", data);
this.setRevocation(designItemDetail,data)
this.deleteItemShow = false
}
).catch(res=>{
this.loadingShow = false
});
},
2023-12-12 11:53:02 +08:00
setDelete(num:number){
this.designItemDetail.clothes.splice(num,1)
2023-12-13 17:15:02 +08:00
this.deleteItemShow = true
2023-12-12 11:53:02 +08:00
},
2023-09-12 10:11:27 +08:00
//图片按下样子
mousedownDesignImg(){
this.imgDesignImg = false
},
//图片抬起样子
mouseupDesignImg(){
this.imgDesignImg = true
},
2023-10-12 17:09:05 +08:00
clothesOpen(index:any){
if(this.deleteShow) return
2023-10-12 17:09:05 +08:00
this.clothesDetail('',index)
2023-12-11 14:30:16 +08:00
this.clothesOpenActive(index)
2023-10-12 17:09:05 +08:00
},
clothesOpenActive(index:any){
this.designItemDetail.clothes.forEach((item:any)=>{
item.clothesOpen = false
})
this.designItemDetail.clothes[index].clothesOpen = true
},
2023-12-11 14:30:16 +08:00
setClothesOpen(){
2024-04-26 17:36:30 +08:00
if(this.deleteShow) return
// if(this.designItemDetail?.clothes.length==0){
// }else{
// return
// }
2023-12-11 14:30:16 +08:00
this.designItemDetail.clothes.forEach((item:any)=>{
item.clothesOpen = false
})
2024-05-16 09:41:16 +08:00
let color,gradient
2023-12-15 11:10:32 +08:00
if(this.designItemDetail.clothes[0]){
color = this.designItemDetail.clothes[0].color
2024-05-16 09:41:16 +08:00
gradient = this.designItemDetail.clothes[0].gradient
2023-12-15 11:10:32 +08:00
}else{
color = {
"id": '',
"name": "Brilliant White New",
"tcx": "11-1123",
"r": 255,
"g": 255,
"b": 255,
"h": 0,
"s": 0,
"v": 100
}
}
2023-12-11 15:12:53 +08:00
let aa = {
"id": '',
"type": "",
"level1Type": null,
"path": "",
"minIOPath": "",
2023-12-12 11:53:02 +08:00
"color": color,
2024-05-16 09:41:16 +08:00
gradient:gradient,
2024-05-27 17:57:37 +08:00
priority:10,
2024-06-17 09:39:01 +08:00
trims:{
"ifSingle": null,
"prints":null,
},
2023-12-11 15:12:53 +08:00
"printObject": {
"prints": [
]
},
2024-07-09 19:10:01 +08:00
undividedLayer:'',
2024-06-17 09:39:01 +08:00
sketchString:'',
2023-12-11 15:12:53 +08:00
"layersObject": [
2024-10-10 11:32:49 +08:00
{
maskMinioUrl:'',
maskUrl:'',
},{
maskMinioUrl:'',
maskUrl:'',
},
2023-12-11 15:12:53 +08:00
]
}
2023-12-12 11:53:02 +08:00
// this.designOrder = true
// let DesignDetailAlter:any = this.$refs.DesignDetailAlter
// DesignDetailAlter.changePlace()
2023-12-13 16:09:17 +08:00
this.designOrder = true
2024-05-27 17:57:37 +08:00
if(this.designItemDetail.clothes?.[this.designItemDetail?.clothes.length-1]?.id || this.designItemDetail.clothes?.length == 0){
2024-04-26 17:36:30 +08:00
this.designItemDetail.clothes.push(aa)
}else{
2024-05-27 17:57:37 +08:00
return
2024-04-26 17:36:30 +08:00
}
2023-12-15 11:10:32 +08:00
this.clothesDetail(aa,this.designItemDetail.clothes.length-1)
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.init(1)
// if(this.designItemDetail.clothes?.[this.designItemDetail.clothes.length-1]?.id){
// // this.current = aa
// // this.designOrder = true
// // let DesignDetailAlter:any = this.$refs.DesignDetailAlter
// // DesignDetailAlter.changePlace()
// }else{
// this.designItemDetail.clothes.push(aa)
// this.clothesDetail(aa,this.designItemDetail.clothes.length-1)
// let DesignDetailAlter:any = this.$refs.DesignDetailAlter
// DesignDetailAlter.init(1)
// }
2023-12-12 11:53:02 +08:00
2023-12-11 14:30:16 +08:00
},
2023-01-06 16:00:15 +08:00
//元素替换
clothesDetail(clothes:any, index:number){
2023-09-25 10:09:00 +08:00
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
2023-09-12 10:11:27 +08:00
this.designOrder = true
2024-05-27 17:57:37 +08:00
if(clothes){
this.current = clothes
}else{
this.current = designItemDetail.clothes[index]
}
if(!this.current) return
if(this.current?.id && !designItemDetail?.clothes[designItemDetail.clothes.length-1].id){
2023-12-13 16:09:17 +08:00
designItemDetail.clothes.splice(designItemDetail.clothes.length-1,1)
this.store.commit('setDesignItemDetail',designItemDetail)
}
let data:any = this.setSubmitItem('preview',false)
this.currentIndex = index?index:0
2024-04-29 17:00:33 +08:00
if(this.current?.printObject?.prints[0]?.minIOPath){
this.current?.printObject?.prints.forEach((element:any) => {
2024-04-29 17:36:28 +08:00
if(!element.designType){
element.designType = 'Library'
}
2024-04-29 17:00:33 +08:00
});
}
2024-06-17 09:39:01 +08:00
this.current.sketchString = ''
2024-05-27 17:57:37 +08:00
this.currentIndex = this.currentIndex>0?this.currentIndex:0
2023-10-11 17:34:14 +08:00
data.designSingleItemDTOList[this.currentIndex] = {
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
2023-12-12 11:53:02 +08:00
id:this.current.id?this.current.id:'',
changed:this.current.changed?this.current.changed:false,
designType:this.current.designType?this.current.designType:'Library',
2023-10-11 17:34:14 +08:00
path:this.current.minIOPath?this.current.minIOPath:'',
2023-12-12 11:53:02 +08:00
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
2024-09-03 16:39:06 +08:00
maskMinioUrl:this.current.layersObject[1].maskMinioUrl,
maskUrl:this.current.layersObject[1].maskUrl,
2023-12-13 16:09:17 +08:00
priority:this.current.priority,
2024-06-17 09:39:01 +08:00
trims:this.current.trims,
2024-05-27 17:57:37 +08:00
scale:this.current.layersObject?.[1]?.scale?this.current.layersObject[1].scale:[1,1],
2024-06-17 09:39:01 +08:00
sketchString:'',
2023-10-11 17:34:14 +08:00
printObject:{
// prints:this.current?.printObject[0]?.path == null ? [] : [{
// location:[0,0],
// angle:0,
// priority:1,
// path:this.current?.printObject?.path?this.current.printObject.path :'',
// minIOPath:this.current?.printObject?.minIOPath?this.current.printObject.minIOPath :'',
// }],
prints:this.current?.printObject?.prints[0]?.minIOPath?this.current?.printObject?.prints:[]
},
2024-07-09 19:10:01 +08:00
undividedLayer:this.current.undividedLayer,
2023-10-11 17:34:14 +08:00
type:this.current.type,
2023-09-25 10:09:00 +08:00
}
2023-12-12 11:53:02 +08:00
// if(clothes && !clothes.id){
// data.designSingleItemDTOList.push(clothes)
// }
2023-09-25 10:09:00 +08:00
this.store.commit('setDesignPreviewData',data)
2023-09-12 10:11:27 +08:00
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.changePlace()
2024-06-17 09:39:01 +08:00
2023-11-28 16:21:00 +08:00
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
2023-01-06 16:00:15 +08:00
},
2024-06-17 09:39:01 +08:00
setSloganData(data:any){
this.current.sketchString = data
// let designData:any = this.setSubmitItem('preview',true)
let designData = this.store.state.DesignDetailModule.designPreviewData
designData.designSingleItemDTOList[this.currentIndex].sketchString = data
this.setDesignSingle(designData)
}
2023-01-06 16:00:15 +08:00
//重新设计
2024-04-30 11:55:42 +08:00
// redesignItem(){
// let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
// delete designItemDetail.designItemUrl
// let priority = designItemDetail.clothes.map((v:any)=>{
// return v.type
// })
// let data = {
// ...designItemDetail,
// priority:priority,
// timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
// }
// this.loadingShow = true
// Https.axiosPost(Https.httpUrls.designSingle, data).then(
// (rv: any) => {
// this.parentData.design.designItemUrl = rv.designItemUrl
// this.$emit('finishRedesign',this.parentData)
// this.closefModal('')
// this.loadingShow = false
// }
// ).catch(res=>{
// this.loadingShow = false
// });
// }
2023-01-06 16:00:15 +08:00
}
})
</script>
<style lang="less">
.design_detail_modal_component{
color: #000;
2023-10-11 17:34:14 +08:00
// max-width: 1440px ;
2024-07-29 17:30:39 +08:00
.mark_loading{
position: absolute;
}
2023-08-23 17:50:09 +08:00
.ant-modal-content{
border-radius: calc(1rem*1.2);
2023-09-12 10:11:27 +08:00
// overflow: hidden;
2023-08-23 17:50:09 +08:00
.ant-modal-header{
background-color: #fff;
border-bottom: none;
}
.ant-modal-body{
2024-10-10 11:32:49 +08:00
padding: calc(5rem*1.2) calc(6rem*1.2) calc(0rem*1.2)!important;
// height: calc(65vh - 6.4rem*1.2));
height: calc(65rem*1.2);
2023-08-23 17:50:09 +08:00
display: flex;
2023-09-12 10:11:27 +08:00
overflow-y: hidden;
2023-08-23 17:50:09 +08:00
flex-direction: column;
}
}
2023-01-06 16:00:15 +08:00
.ant-modal-close{
width: calc(3.6rem*1.2);
height: calc(3.6rem*1.2);
2023-01-06 16:00:15 +08:00
position: absolute;
top: calc(-1.8rem*1.2);
right: calc(-1.8rem*1.2);
2023-01-06 16:00:15 +08:00
}
.ant-modal-header{
display: none;
}
2023-09-12 10:11:27 +08:00
2023-01-06 16:00:15 +08:00
.turn_button{
width: calc(3.6rem*1.2);
height: calc(3.6rem*1.2);
2023-01-06 16:00:15 +08:00
background: #000000;
border-radius: 50%;
position: absolute;
top: calc(50% - calc(1.8rem*1.2));
2023-01-06 16:00:15 +08:00
cursor: pointer;
line-height: calc(3.6rem*1.2);
2023-01-06 16:00:15 +08:00
text-align: center;
&.turn_left_button{
left: calc(-8rem*1.2);
2023-01-06 16:00:15 +08:00
}
&.turn_right_button{
right: calc(-8rem*1.2);
2023-01-06 16:00:15 +08:00
}
.icon_turn{
font-size: calc(2.4rem*1.2);
2023-01-06 16:00:15 +08:00
color: #ffffff;
}
}
.design_detail_modal_body{
2023-08-23 17:50:09 +08:00
flex: 1;
2023-01-06 16:00:15 +08:00
display: flex;
justify-content: space-between;
width: 100%;
2023-09-12 10:11:27 +08:00
overflow: hidden;
// padding: 1.5rem*1.2) 1rem*1.2) 2.5rem*1.2);
2023-01-06 16:00:15 +08:00
box-sizing: border-box;
2023-08-23 17:50:09 +08:00
.detail_modal_body_img{
overflow: hidden;
// width: 43.3rem*1.2);
2023-08-23 17:50:09 +08:00
width: 23%;
2023-01-06 16:00:15 +08:00
height: 100%;
background: #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
2023-08-23 17:50:09 +08:00
position: relative;
2023-09-12 10:11:27 +08:00
flex-direction: column;
2023-09-25 10:09:00 +08:00
// height: 50%;
.detail_modal_body{
position: relative;
2023-10-11 17:34:14 +08:00
// max-width: 245px;
2023-10-20 17:21:45 +08:00
width: 100%;
2023-10-12 17:09:05 +08:00
height: 100%;
2023-12-11 14:30:16 +08:00
.detail_modal_body_Set{
display: flex;
align-items: center;
justify-content: center;
font-size: calc(3.4rem*1.2);
2023-12-11 14:30:16 +08:00
}
2023-10-12 17:09:05 +08:00
.detail_modal_body_nav{
display: flex;
position: absolute;
top: 0;
left: 50%;
z-index: 999;
transform: translate(-50%,-120%);
transition: all .3s;
2023-10-12 17:09:05 +08:00
>div{
width: calc(4rem*1.2);
height: calc(4rem*1.2);
2023-10-12 17:09:05 +08:00
cursor: pointer;
text-align: center;
margin-left: calc(.3rem*1.2);
2023-10-12 17:09:05 +08:00
img{
// width: 100%;
height: 100%;
2023-10-13 17:06:44 +08:00
max-width: 100%;
object-fit: cover;
2023-10-12 17:09:05 +08:00
}
&.active{
border: 2px solid rgba(0,0,0,0.4);
img{
transform: scale(.8);
opacity: .8;
}
}
}
>div:nth-child(1){
margin-left: calc(0rem*1.2);
2023-10-12 17:09:05 +08:00
}
}
2023-09-25 10:09:00 +08:00
.detail_modal_item_front:last-child{
2023-12-13 16:09:17 +08:00
// z-index: 1 !important;
2023-09-25 10:09:00 +08:00
}
>img{
width: 100%;
}
.detail_modal_model_content{
top: 50%;
transform: translate(-50%, -50%);
left: 50%;
2023-09-25 10:09:00 +08:00
position: relative;
height: 80%;
display: inline-block;
2023-12-07 13:23:50 +08:00
// display: block;
overflow: initial !important;
2023-11-29 10:11:19 +08:00
// width: 100%;
text-align: center;
.detail_modal_model{
z-index: 1;
position: relative;
2023-10-20 17:21:45 +08:00
width: auto;
max-height: 100%;
2024-05-22 11:05:17 +08:00
max-width: 100%;
object-fit: contain;
2024-05-20 14:45:43 +08:00
top: 50%;
transform: translateY(-50%);
2023-09-25 10:09:00 +08:00
}
2023-12-20 10:01:39 +08:00
&.active{
width: 100%;
2023-12-20 17:03:42 +08:00
max-height: 100%;
2023-12-20 10:01:39 +08:00
}
.detail_modal_item_front,.detail_modal_item_back{
cursor: pointer;
position: absolute;
img{
// width: 100%;
max-height: 100%;
2023-12-20 17:03:42 +08:00
}
&.active{
top: 50%;
left: 50%;
2023-12-20 17:03:42 +08:00
max-width: 100%;
max-height: 100%;
transform: translate(-50%,-50%);
2023-12-20 10:01:39 +08:00
img{
2023-12-20 17:03:42 +08:00
max-width: 100%;
width: auto;
margin: 0 auto;
display: flex;
2023-12-20 10:01:39 +08:00
}
}
2023-10-11 17:34:14 +08:00
}
.detail_modal_item_back{
z-index: 1 !important;
}
.detail_modal_item_front{
2023-12-20 10:01:39 +08:00
z-index: 2;
}
2023-09-12 10:11:27 +08:00
}
2023-09-12 10:11:27 +08:00
}
2023-10-13 17:06:44 +08:00
.subitOkPreviewBtn{
bottom: calc(2rem*1.2);
2023-10-13 17:06:44 +08:00
z-index: 999;
}
2023-09-25 10:09:00 +08:00
.clothes_item_img_block{
display: flex;
}
2023-01-06 16:00:15 +08:00
.detial_img{
max-width: 100%;
max-height: 80%;
2023-01-06 16:00:15 +08:00
}
2023-10-11 17:34:14 +08:00
.detail_btn{
z-index: 9999;
}
.detial_img1{
position: absolute;
}
2023-08-23 17:50:09 +08:00
div{
i{
position: absolute;
2023-09-12 10:11:27 +08:00
cursor: pointer;
zoom: 1.2;
transition: all .3s;
2023-08-23 17:50:09 +08:00
&.fi-bs-expand-arrows-alt{
top: 0;
left: 0;
transform: translateX(-120%);
2023-08-23 17:50:09 +08:00
}
&.fi-rr-edit{
left: 0;
top: calc(3rem*1.2);
transform: translateX(-120%);
2023-08-23 17:50:09 +08:00
}
2023-12-12 11:53:02 +08:00
&.fi-rr-trash{
left: 0;
top: calc(6rem*1.2);
2023-12-12 11:53:02 +08:00
transform: translateX(-120%);
}
&.fi-br-check{
left: 0;
top: calc(6rem*1.2);
2023-12-12 11:53:02 +08:00
transform: translateX(-120%);
}
2023-08-23 17:50:09 +08:00
&.fi-rr-copy{
top: 0;
right: 0;
transform: translateX(120%);
}
&.icon-fanchehui{
top: calc(6rem*1.2);
right: 0;
transform: translateX(120%);
}
&.icon-chehui{
top: calc(3rem*1.2);
right: 0;
transform: translateX(120%);
}
}
i:hover{
}
}
&.detail_modal_body_img:hover{
.detail_modal_body{
.detail_modal_body_nav{
transform: translate(-50%,0%);
2023-12-12 11:53:02 +08:00
>div{
position: relative;
.fi{
color: #fff;
width: 100%;
height: 100%;
background: #00000033;
left: 0;
top: 0;
display: flex;
align-items: center;
justify-content: center;
}
}
}
}
div{
i{
transform: translateX(0);
2023-08-23 17:50:09 +08:00
}
}
}
2023-01-06 16:00:15 +08:00
}
2023-08-23 17:50:09 +08:00
.detail_modal_body_category{
width: 17%;
2023-01-06 16:00:15 +08:00
height: 100%;
2023-09-12 10:11:27 +08:00
position: relative;
2023-01-06 16:00:15 +08:00
.detail_modal_right_top{
width: 100%;
2023-10-20 17:21:45 +08:00
height: 100%;
2023-01-06 16:00:15 +08:00
background: #fff;
overflow-y: auto;
2023-10-20 17:21:45 +08:00
display: flex;
flex-direction: column;
2023-11-08 09:31:40 +08:00
overflow: hidden;
2024-06-17 09:39:01 +08:00
overflow-y: auto;
2023-12-13 16:36:54 +08:00
.hideCursor{
*{
cursor: not-allowed !important;
}
}
2024-06-17 09:39:01 +08:00
&.detail_modal_right_top::-webkit-scrollbar{display: none;}
2023-01-06 16:00:15 +08:00
.clothes_detail_item{
// margin-bottom: 5rem*1.2);
position: relative;
2024-06-17 09:39:01 +08:00
height: 20rem;
// flex: 1;
flex-shrink: 0;
2023-09-12 10:11:27 +08:00
.centent_div{
display: flex;
2023-10-11 17:34:14 +08:00
cursor: pointer;
2023-09-25 10:09:00 +08:00
justify-content: center;
2023-09-12 10:11:27 +08:00
}
2024-06-17 09:39:01 +08:00
.centent_print{
flex-wrap: wrap;
justify-content: space-between;
align-content: space-between;
2024-06-17 11:32:31 +08:00
max-height: 10rem;
overflow-y: auto;
&.centent_print::-webkit-scrollbar{display: none;}
2024-06-17 09:39:01 +08:00
img{
width: 30%;
height: 30%;
margin-bottom: 1rem;
}
}
2023-08-23 17:50:09 +08:00
.centent{
cursor: pointer;
left: 50%;
transform: translateX(-50%);
position: relative;
display: inline-block;
}
2023-12-13 16:36:54 +08:00
2023-01-06 16:00:15 +08:00
.clothes_item_header{
// height: 6.4rem*1.2);
margin-bottom: calc(1rem*1.2);
2023-08-23 17:50:09 +08:00
display: flex;
2023-11-27 16:25:32 +08:00
font-size: var(--aida-fsize1-8);
2023-01-06 16:00:15 +08:00
color: #000000;
2023-08-23 17:50:09 +08:00
justify-content: space-between;
2024-06-17 09:39:01 +08:00
position: relative;
2023-01-06 16:00:15 +08:00
.icon-dangqianweizhi{
font-size: calc(1.8rem*1.2);
2023-01-06 16:00:15 +08:00
color: #000000;
margin-right: calc(1rem*1.2);
2023-01-06 16:00:15 +08:00
}
2024-06-17 09:39:01 +08:00
.fi-rs-pencil-paintbrush{
position: absolute;
right: 0;
top: 4rem;
cursor: pointer;
}
2023-08-23 17:50:09 +08:00
i{
2023-11-27 16:25:32 +08:00
font-size: var(--aida-fsize1-8);
display: flex;
align-items: center;
2023-09-25 10:09:00 +08:00
&.fi-rr-edit{
cursor: pointer;
}
2023-08-23 17:50:09 +08:00
}
2023-01-06 16:00:15 +08:00
}
.clothes_item_icon{
top: 50%;
position: absolute;
left: 50%;
transform: translate(-50%,-50%);
}
2023-08-23 17:50:09 +08:00
img{
width: calc(10rem*1.2);
height: calc(10rem*1.2);
2023-08-23 17:50:09 +08:00
}
2023-09-12 10:11:27 +08:00
&.clothes_detail_item_apparel{
img{
max-height: 100%;
2023-09-26 15:05:14 +08:00
width: auto;
2023-09-12 10:11:27 +08:00
}
}
2023-08-23 17:50:09 +08:00
.color_item{
display: inline-block;
vertical-align: top;
border: 1px solid #ebe9e9;
.color_content{
width: calc(8rem*1.2);
height: calc(4rem*1.2);
2023-09-12 10:11:27 +08:00
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
2023-08-23 17:50:09 +08:00
}
.color_content_body{
.color_des{
font-size: calc(1.2rem*1.2);
2023-08-23 17:50:09 +08:00
font-weight: 600;
2023-10-11 17:34:14 +08:00
white-space: nowrap;
width: calc(8rem*1.2);
2023-10-11 17:34:14 +08:00
overflow: hidden;
text-overflow: ellipsis;
2023-08-23 17:50:09 +08:00
}
}
&:nth-child(4n){
margin-right: 0;
}
}
2023-12-12 11:53:02 +08:00
&.clothes_detail_item_print,
2024-06-17 09:39:01 +08:00
&.clothes_detail_item_apparel,
&.clothes_detail_item_elements{
2023-08-23 17:50:09 +08:00
.fi-rr-picture{
display: flex;
align-items: center;
justify-content: center;
2024-01-29 21:47:51 +08:00
font-size: 1.4*3rem;
margin: calc(1rem*1.2) 0;
2023-08-23 17:50:09 +08:00
}
}
2023-09-12 10:11:27 +08:00
&.subitOkPreviewBtn{
position: relative;
margin-top: calc(2rem*1.2);
2023-09-12 10:11:27 +08:00
}
2023-01-06 16:00:15 +08:00
}
}
}
2023-08-23 17:50:09 +08:00
.detail_modal_body_select{
width: 20%;
.switch_type_list {
display: flex;
align-items: center;
position: relative;
justify-content: space-around;
.switch_type_item {
display: flex;
align-items: center;
// padding: 0 2rem*1.2);
height: calc(4rem*1.2);
2023-08-23 17:50:09 +08:00
background: #fff;
border-radius: calc(0.8rem*1.2);
line-height: calc(4rem*1.2);
2023-11-27 16:25:32 +08:00
font-size: var(--aida-fsize1-8);
// margin-right: 2.2rem*1.2);
2023-08-23 17:50:09 +08:00
color: #000;
cursor: pointer;
position: relative;
text-align: center;
transform-origin: left;
transform: scale(1);
transition: 0.3s all;
&.switch_type_item::before {
position: absolute;
content: "";
display: block;
background: #000;
height: calc(.4rem*1.2);
2023-08-23 17:50:09 +08:00
left: 50%;
transform: translateX(-50%);
bottom: calc(.6rem*1.2);
2023-08-23 17:50:09 +08:00
width: 0px;
transition: 0.3s all;
}
&.select_swtich {
color: #000;
font-weight: 600;
transform: scale(1.15);
}
&.select_swtich::before {
width: 100%;
}
.switch_icon {
font-size: calc(1.8rem*1.2);
margin-right: calc(0.8rem*1.2);
2023-08-23 17:50:09 +08:00
}
}
}
}
2023-01-06 16:00:15 +08:00
}
.design_detail_perview{
width: 100%;
height: 100%;
2023-10-11 17:34:14 +08:00
flex: 1;
overflow: hidden;
2023-01-06 16:00:15 +08:00
&.design_detail_perview_second{
width: 100%;
height: 100%;
padding: calc(0.7rem*1.2) calc(9.1rem*1.2) calc(0.6rem*1.2);
2023-01-06 16:00:15 +08:00
display: flex;
justify-content: space-between;
align-items: center;
}
.design_detail_perview_content{
height: 100%;
background: #fff;
position: relative;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
.perview_img{
max-width: 100%;
max-height: 100%;
}
.generate_button{
position: absolute;
top: 0;
right: calc(-20.2rem*1.2);
padding: 0 calc(1.5rem*1.2);
2023-01-06 16:00:15 +08:00
text-align: center;
height: calc(3.6rem*1.2);
line-height: calc(3.6rem*1.2);
2023-01-06 16:00:15 +08:00
background: #343579;
font-size: calc(1.4rem*1.2);
2023-01-06 16:00:15 +08:00
font-family: Roboto;
color: #FFFFFF;
cursor: pointer;
}
&:hover .img_item_hover{
display: block;
}
.img_item_hover{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top:0;
background: rgba(0,0,0,0.4);
display: none;
.img_operate_block{
width:calc(3.6rem*1.2);
height: calc(3.6rem*1.2);
2023-01-06 16:00:15 +08:00
background: rgba(0,0,0,0.6);
border-radius: 50%;
position: absolute;
right: calc(2.2rem*1.2);
2023-01-06 16:00:15 +08:00
text-align: center;
line-height: calc(3.6rem*1.2);
2023-01-06 16:00:15 +08:00
cursor: pointer;
&.delete_img_block{
top: calc(2rem*1.2);
2023-01-06 16:00:15 +08:00
}
.operate_icon{
font-size: calc(1.8rem*1.2);
2023-01-06 16:00:15 +08:00
color: #fff;
}
}
}
}
}
}
2023-11-02 11:00:38 +08:00
</style>
<style lang="less">
.design_detail_modal_component{
2024-07-29 17:30:39 +08:00
2023-11-02 11:00:38 +08:00
}
2023-08-23 17:50:09 +08:00
</style>