This commit is contained in:
X1627315083
2023-12-15 11:10:32 +08:00
parent a917bf66d2
commit a5317551f7
13 changed files with 139 additions and 53 deletions

View File

@@ -253,7 +253,11 @@ export default defineComponent({
handler: async function(newVal,oldVal) {
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
this.ifSubmit = designItemDetail.ifSubmit?designItemDetail.ifSubmit:false
this.current = JSON?.parse(JSON?.stringify(designItemDetail?.clothes?.[this?.currentIndex]))
if(newVal.clothes.length == 0){
this.current = ''
}else{
this.current = JSON?.parse(JSON?.stringify(designItemDetail?.clothes?.[this?.currentIndex]))
}
if(designItemDetail.others[0].layersObject.length != 0){
this.body = false
}else{
@@ -781,7 +785,22 @@ export default defineComponent({
this.designItemDetail.clothes.forEach((item:any)=>{
item.clothesOpen = false
})
let color = this.designItemDetail.clothes[0].color
let color
if(this.designItemDetail.clothes[0]){
color = this.designItemDetail.clothes[0].color
}else{
color = {
"id": '',
"name": "Brilliant White New",
"tcx": "11-1123",
"r": 255,
"g": 255,
"b": 255,
"h": 0,
"s": 0,
"v": 100
}
}
let aa = {
"id": '',
"type": "",
@@ -802,17 +821,21 @@ export default defineComponent({
// let DesignDetailAlter:any = this.$refs.DesignDetailAlter
// DesignDetailAlter.changePlace()
this.designOrder = true
if(this.designItemDetail.clothes[this.designItemDetail.clothes.length-1].id){
this.designItemDetail.clothes.push(aa)
this.clothesDetail(aa,this.designItemDetail.clothes.length-1)
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.init(1)
// 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)
// 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)
// }
},
//元素替换

View File

@@ -1431,12 +1431,23 @@ export default defineComponent({
bottom: -.5rem;
right: .5rem;
border-radius: .5rem;
}
.vc-chrome-fields{
.vc-input__label{
margin-top: 1rem;
}
}
.vc-chrome-fields:nth-child(2){
>:last-of-type {
display: none;
}
}
.vc-chrome-fields:nth-child(3){
>:last-of-type {
display: none;
}
}
}
.vc-chrome-controls{
align-items: center;

View File

@@ -251,6 +251,7 @@ export default defineComponent({
})
if(!this.current.id){
data.designSingleItemDTOList[index].priority = zIndex+=1
}
if(this.type_ == 1){
if(data.designSingleItemDTOList[index].path != this.sketchImg.minIOPath && this.sketchImg.id_){
@@ -267,30 +268,7 @@ export default defineComponent({
let color = `${this.$parent.selectColor.rgba.r} ${this.$parent.selectColor.rgba.g} ${this.$parent.selectColor.rgba.b}`
data.designSingleItemDTOList[index].color = color
}
// if(!bor){
// index = designItemDetail.clothes.length
// let color = `${this.$parent.selectColor.rgba.r} ${this.$parent.selectColor.rgba.g} ${this.$parent.selectColor.rgba.b}`
// let obj = {
// "color": color,
// "id": this.sketchImg.id_? this.sketchImg.id_:this.current.id_,
// "path": this.sketchImg.minIOPath? this.sketchImg.minIOPath: this.current.minIOPath,
// "offset": [
// 0,
// 0
// ],
// "scale": 1,
// "printObject": {
// "ifSingle": false,
// "prints": [
// ]
// },
// priority:zIndex,
// "type": this.sketchImg.type
// }
// // data.designSingleItemDTOList.push(obj)
// // designItemDetail.clothes.push(obj)
// }
// return
data.timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
this.loadingShow = true
Https.axiosPost(Https.httpUrls.designSingle, data).then(
@@ -310,7 +288,7 @@ export default defineComponent({
}else{
}
if(!designItemDetail.clothes[index].id){
if(!this.current.id ){
designItemDetail.clothes[index].priority = zIndex
}
}