push Develop
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
<i class="fi fi-rs-comments"></i>
|
||||
<div>{{ $t('DesignDetail.CurrentApparel') }}</div>
|
||||
<i class="fi fi-rr-edit" @click.stop="openCurrent(1)"></i>
|
||||
<i v-show="current?.id" class="fi fi-rs-pencil-paintbrush" @click.stop="addDetail"></i>
|
||||
</div>
|
||||
<div class="centent_div" v-if="current?.id" @click="openCurrent(1)">
|
||||
<img :src="current?.path" alt="" class="" @click="openCurrent(1)">
|
||||
@@ -93,12 +94,14 @@
|
||||
<i class="fi fi-rr-edit" @click.stop="openCurrent(2)"></i>
|
||||
</div>
|
||||
<div class="Guide_1_20 clothes_item_icon" :class="[driver__.driver?'showEvents':'']">
|
||||
<div class="centent_div" v-if="current?.printObject?.prints?.[0]?.path" @click="openCurrent(2)">
|
||||
<div class="centent_div centent_print" v-if="current?.printObject?.prints?.[0]?.path && current?.printObject?.prints.length > 1" @click="openCurrent(2)">
|
||||
<img v-for="item in current?.printObject?.prints" :key="item.id" :src="item.path" alt="">
|
||||
</div>
|
||||
<div v-else-if="current?.printObject?.prints?.[0]?.path && current?.printObject?.prints.length == 1" class="centent_div">
|
||||
<img :src="current?.printObject?.prints[0]?.path" alt="">
|
||||
</div>
|
||||
<i v-else class="fi fi-rr-picture centent" @click="openCurrent(2)"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="clothes_detail_item clothes_detail_item_color" :class="[current?.id?'':'hideCursor']">
|
||||
<div class="clothes_item_header">
|
||||
@@ -117,7 +120,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<div>Current Elements</div>
|
||||
<i class="fi fi-rr-edit" @click.stop="openCurrent(4)"></i>
|
||||
</div>
|
||||
<div class="Guide_1_20 clothes_item_icon" :class="[driver__.driver?'showEvents':'']">
|
||||
<!-- <div class="centent_div" v-if="current?.printObject?.prints?.[0]?.path" @click="openCurrent(2)">
|
||||
<img :src="current?.printObject?.prints[0]?.path" alt="">
|
||||
</div> -->
|
||||
<i class="fi fi-rr-picture centent" @click="openCurrent(4)"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<DesignDetailAlter ref="DesignDetailAlter"></DesignDetailAlter>
|
||||
@@ -139,6 +154,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<addDetails ref="addDetails" @setSloganData="setSloganData"></addDetails>
|
||||
</a-modal>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
@@ -163,6 +179,7 @@ import { openGuide,driverObj__ } from "@/tool/guide";
|
||||
import GO from '@/tool/GO';
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import addDetails from '@/component/Detail/addDetails.vue'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
Draggable,
|
||||
@@ -170,6 +187,7 @@ export default defineComponent({
|
||||
setDesignItem,
|
||||
magnifyingGlass,
|
||||
setDesignItemMobile,
|
||||
addDetails,
|
||||
},
|
||||
setup() {
|
||||
const store = useStore();
|
||||
@@ -212,6 +230,11 @@ export default defineComponent({
|
||||
provide('body',body)
|
||||
let moible:any = isMoible()
|
||||
provide('moible',moible)
|
||||
let exhibitionList = ref({
|
||||
print:[],
|
||||
elements:[],
|
||||
})
|
||||
provide('exhibitionList',exhibitionList)
|
||||
let {t} = useI18n()
|
||||
//创建单件衣服
|
||||
let setClothes:any = ref()
|
||||
@@ -239,6 +262,7 @@ export default defineComponent({
|
||||
revocationShow,
|
||||
driver__,
|
||||
moible,
|
||||
exhibitionList,
|
||||
t,
|
||||
setClothes,
|
||||
deleteShow,
|
||||
@@ -324,7 +348,21 @@ export default defineComponent({
|
||||
handler: function(newval) {
|
||||
// this.removeRevocation()
|
||||
}
|
||||
}
|
||||
},
|
||||
'current.printObject.prints':{
|
||||
handler(newVal,oldVal){
|
||||
if(newVal && newVal.length > 0){
|
||||
this.exhibitionList.print = this.setExhibitionList(newVal)
|
||||
}
|
||||
}
|
||||
},
|
||||
'current.trims.prints':{
|
||||
handler(newVal,oldVal){
|
||||
if(newVal && newVal.length > 0){
|
||||
this.exhibitionList.elements = this.setExhibitionList(newVal)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
@@ -387,7 +425,10 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
addDetail(){
|
||||
let addDetails:any = this.$refs.addDetails
|
||||
addDetails.init(this.current,this.currentIndex)
|
||||
},
|
||||
closeModal(submit:any){
|
||||
if(this.designShowPrview == 1){
|
||||
if(this.ifSubmit && submit == ''){
|
||||
@@ -423,7 +464,19 @@ export default defineComponent({
|
||||
// this.designItemDetailUrl = {}
|
||||
}
|
||||
},
|
||||
|
||||
//切换当前展示的是印花还是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;
|
||||
}
|
||||
});
|
||||
},
|
||||
showDesignDetailModal(data:any,str:string){
|
||||
this.moible = isMoible()
|
||||
this.designItemId = data.design.designItemId
|
||||
@@ -443,7 +496,7 @@ export default defineComponent({
|
||||
item.layersObject[1] = a
|
||||
}
|
||||
if(item.printObject.prints == null){
|
||||
item.printObject.prints = [{}]
|
||||
item.printObject.prints = []
|
||||
}else{
|
||||
item.printObject.prints.forEach((element:any) => {
|
||||
if(!element.designType){
|
||||
@@ -674,6 +727,8 @@ export default defineComponent({
|
||||
id:item.id,
|
||||
path:item.minIOPath,
|
||||
gradient:{},
|
||||
trims:item.trims,
|
||||
sketchString:item.sketchString,
|
||||
changed:item.changed?item.changed:false,
|
||||
designType:item.designType?item.designType:"Library",
|
||||
offset:item.layersObject?.[1]?.offset == null?[0,0]:item.layersObject[1].offset,
|
||||
@@ -711,6 +766,7 @@ export default defineComponent({
|
||||
gender:workspace?.sex,
|
||||
designSingleItemDTOList:clothes,
|
||||
isPreview:false,
|
||||
sketchString:'',
|
||||
ifSubmit:designItemDetail.isPreview,
|
||||
processId:String(this.userInfo?.userId),
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
@@ -772,6 +828,7 @@ export default defineComponent({
|
||||
img.onload = () => {
|
||||
imgWidth = img.width
|
||||
resolve(img)
|
||||
img.remove()
|
||||
};
|
||||
img.onerror = reject;
|
||||
img.src = url;
|
||||
@@ -852,38 +909,46 @@ export default defineComponent({
|
||||
}else{
|
||||
this.deleteShow = false
|
||||
|
||||
let designItemDetail = JSON.parse(JSON.stringify(this.designItemDetail))
|
||||
|
||||
let data:any = this.setSubmitItem('preview',true)
|
||||
if(!this.deleteItemShow){
|
||||
return
|
||||
}
|
||||
this.loadingShow = true
|
||||
Https.axiosPost(Https.httpUrls.designSingle, data).then(
|
||||
(rv) => {
|
||||
this.designItemDetail.currentFullBodyView = rv.currentFullBodyView
|
||||
this.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);
|
||||
console.log(123);
|
||||
this.store.commit("setDesignPreviewData", data);
|
||||
this.setRevocation(designItemDetail,data)
|
||||
this.deleteItemShow = false
|
||||
}
|
||||
).catch(res=>{
|
||||
this.loadingShow = false
|
||||
});
|
||||
this.setDesignSingle(data)
|
||||
}
|
||||
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
|
||||
DesignDetailAlter.changePlace()
|
||||
DesignDetailAlter.terminate()
|
||||
},
|
||||
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
|
||||
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
|
||||
});
|
||||
},
|
||||
setDelete(num:number){
|
||||
this.designItemDetail.clothes.splice(num,1)
|
||||
this.deleteItemShow = true
|
||||
@@ -942,12 +1007,16 @@ export default defineComponent({
|
||||
"color": color,
|
||||
gradient:gradient,
|
||||
priority:10,
|
||||
trims:{
|
||||
"ifSingle": null,
|
||||
"prints":null,
|
||||
},
|
||||
"printObject": {
|
||||
"ifSingle": null,
|
||||
"prints": [
|
||||
{}
|
||||
]
|
||||
},
|
||||
sketchString:'',
|
||||
"layersObject": [
|
||||
]
|
||||
}
|
||||
@@ -1001,17 +1070,19 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
}
|
||||
this.current.sketchString = ''
|
||||
this.currentIndex = this.currentIndex>0?this.currentIndex:0
|
||||
data.designSingleItemDTOList[this.currentIndex] = {
|
||||
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
|
||||
|
||||
id:this.current.id?this.current.id:'',
|
||||
changed:this.current.changed?this.current.changed:false,
|
||||
designType:this.current.designType?this.current.designType:'Library',
|
||||
path:this.current.minIOPath?this.current.minIOPath:'',
|
||||
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
|
||||
priority:this.current.priority,
|
||||
trims:this.current.trims,
|
||||
scale:this.current.layersObject?.[1]?.scale?this.current.layersObject[1].scale:[1,1],
|
||||
sketchString:'',
|
||||
printObject:{
|
||||
ifSingle:this.current?.printObject?.ifSingle == null ? false : this.current?.printObject?.ifSingle,
|
||||
// prints:this.current?.printObject[0]?.path == null ? [] : [{
|
||||
@@ -1031,12 +1102,21 @@ export default defineComponent({
|
||||
this.store.commit('setDesignPreviewData',data)
|
||||
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
|
||||
DesignDetailAlter.changePlace()
|
||||
|
||||
if(this.driver__.driver){
|
||||
nextTick().then(()=>{
|
||||
driverObj__.moveNext();
|
||||
})
|
||||
}
|
||||
},
|
||||
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)
|
||||
}
|
||||
//重新设计
|
||||
// redesignItem(){
|
||||
// let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||
@@ -1356,20 +1436,34 @@ export default defineComponent({
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
.hideCursor{
|
||||
*{
|
||||
cursor: not-allowed !important;
|
||||
}
|
||||
}
|
||||
&.detail_modal_right_top::-webkit-scrollbar{display: none;}
|
||||
.clothes_detail_item{
|
||||
// margin-bottom: 5rem*1.2);
|
||||
position: relative;
|
||||
flex: 1;
|
||||
height: 20rem;
|
||||
// flex: 1;
|
||||
flex-shrink: 0;
|
||||
.centent_div{
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
justify-content: center;
|
||||
}
|
||||
.centent_print{
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-content: space-between;
|
||||
img{
|
||||
width: 30%;
|
||||
height: 30%;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
.centent{
|
||||
cursor: pointer;
|
||||
|
||||
@@ -1386,11 +1480,18 @@ export default defineComponent({
|
||||
font-size: var(--aida-fsize1-8);
|
||||
color: #000000;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
.icon-dangqianweizhi{
|
||||
font-size: calc(1.8rem*1.2);
|
||||
color: #000000;
|
||||
margin-right: calc(1rem*1.2);
|
||||
}
|
||||
.fi-rs-pencil-paintbrush{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 4rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
i{
|
||||
font-size: var(--aida-fsize1-8);
|
||||
display: flex;
|
||||
@@ -1442,7 +1543,8 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
&.clothes_detail_item_print,
|
||||
&.clothes_detail_item_apparel{
|
||||
&.clothes_detail_item_apparel,
|
||||
&.clothes_detail_item_elements{
|
||||
.fi-rr-picture{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user