修复detail操作按钮集中左上角
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
<div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div>
|
<div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="gmail_btn">
|
<div class="gmail_btn">
|
||||||
<div v-if="!userDetail.accountExtendList?.Google" class="gallery_btn">{{ $t('frontPage.BindNow') }}</div>
|
<div v-if="!userDetail.accountExtendList?.Google" class="gallery_btn" style="pointer-events: none;">{{ $t('frontPage.BindNow') }}</div>
|
||||||
<div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div>
|
<div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div>
|
||||||
<div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div>
|
<div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div>
|
||||||
<!-- <div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div> -->
|
<!-- <div v-if="userDetail.accountExtendList?.Google" class="gallery_btn" @click="ungroupGoogleModel">{{ $t('frontPage.Unbind') }}</div> -->
|
||||||
@@ -276,7 +276,7 @@ export default defineComponent({
|
|||||||
> .gallery_btn{
|
> .gallery_btn{
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
pointer-events: none;
|
|
||||||
}
|
}
|
||||||
#g_id_bind{
|
#g_id_bind{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -167,60 +167,64 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const showDesignDetailModal = (data:any,str:any)=>{
|
const showDesignDetailModal = (data:any,str:any)=>{
|
||||||
// let url = Https.httpUrls.getDesignDetail + `?designItemId=${77770}&designPythonOutfitId=${77423}`
|
return new Promise<void>((resolve, reject) => {
|
||||||
let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}`
|
store.commit('DesignDetail/clearDetailData')
|
||||||
detailData.loadingShow = true
|
// let url = Https.httpUrls.getDesignDetail + `?designItemId=${77770}&designPythonOutfitId=${77423}`
|
||||||
Https.axiosGet(url).then(
|
let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}`
|
||||||
async (rv: any) => {
|
detailData.loadingShow = true
|
||||||
store.commit('DesignDetail/setDesignDetail',rv)
|
Https.axiosGet(url).then(
|
||||||
rv.clothes.forEach((item:any)=>{
|
async (rv: any) => {
|
||||||
let a
|
store.commit('DesignDetail/setDesignDetail',rv)
|
||||||
item.designType='Library'
|
rv.clothes.forEach((item:any)=>{
|
||||||
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
|
let a
|
||||||
a = item.layersObject[0]
|
item.designType='Library'
|
||||||
item.layersObject[0] = item.layersObject[1]
|
if(item.layersObject[0].imageCategory.indexOf("back") == -1){
|
||||||
item.layersObject[1] = a
|
a = item.layersObject[0]
|
||||||
}
|
item.layersObject[0] = item.layersObject[1]
|
||||||
if(item.color){
|
item.layersObject[1] = a
|
||||||
item.color.rgba = {
|
|
||||||
r:item.color.r,
|
|
||||||
g:item.color.g,
|
|
||||||
b:item.color.b,
|
|
||||||
}
|
}
|
||||||
}else{
|
if(item.color){
|
||||||
item.color = {
|
item.color.rgba = {
|
||||||
// rgba:{
|
r:item.color.r,
|
||||||
// r:undefined,
|
g:item.color.g,
|
||||||
// g:undefined,
|
b:item.color.b,
|
||||||
// b:undefined,
|
}
|
||||||
// }
|
}else{
|
||||||
|
item.color = {
|
||||||
|
// rgba:{
|
||||||
|
// r:undefined,
|
||||||
|
// g:undefined,
|
||||||
|
// b:undefined,
|
||||||
|
// }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if(item.gradient){
|
||||||
if(item.gradient){
|
item.color.gradient = item.gradient
|
||||||
item.color.gradient = item.gradient
|
|
||||||
}
|
|
||||||
if(item.printObject.prints == null)item.printObject.prints = []
|
|
||||||
item.printObject.prints.forEach((element:any) => {
|
|
||||||
if(!element.designType){
|
|
||||||
element.designType = 'Library'
|
|
||||||
}
|
}
|
||||||
});
|
if(item.printObject.prints == null)item.printObject.prints = []
|
||||||
})
|
item.printObject.prints.forEach((element:any) => {
|
||||||
detailData.singleOveral.value = rv.singleOverall
|
if(!element.designType){
|
||||||
detailData.designDetailShow = true
|
element.designType = 'Library'
|
||||||
// this.deleteShow = false
|
}
|
||||||
initialize()
|
});
|
||||||
setRevocation()
|
})
|
||||||
detailData.loadingShow = false
|
detailData.singleOveral.value = rv.singleOverall
|
||||||
if(rv.singleOverall == "single"){
|
detailData.designDetailShow = true
|
||||||
store.commit('DesignDetail/setDesignColthes',rv.clothes[0].id)
|
// this.deleteShow = false
|
||||||
|
initialize()
|
||||||
|
setRevocation()
|
||||||
|
detailData.loadingShow = false
|
||||||
|
if(rv.singleOverall == "single"){
|
||||||
|
store.commit('DesignDetail/setDesignColthes',rv.clothes[0].id)
|
||||||
|
}
|
||||||
|
resolve(rv)
|
||||||
}
|
}
|
||||||
|
).catch(rv=>{
|
||||||
|
detailData.loadingShow = false
|
||||||
|
resolve(rv)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
).catch(rv=>{
|
|
||||||
detailData.loadingShow = false
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
const initialize = ()=>{//design后初始化
|
const initialize = ()=>{//design后初始化
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="designOpenrtion_print" v-for="item,index in frontBack.back" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))" @click="setpitch(item,index)" :style="frontBack.front[index].style">
|
<div class="designOpenrtion_print" v-for="item,index in frontBack.back" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))" @click="setpitch(item,index)" :style="frontBack.front[index].style">
|
||||||
<img :style="item.imageUrl?'':'display:none;'" :src="item.imageUrl" alt="">
|
<img :style="item.imageUrl?'':'display:none;'" :src="item.imageUrl" alt="">
|
||||||
</div>
|
</div>
|
||||||
<img class="perview_img" @load="setPrintSize()" ref="detailBody" :src="frontBack?.body?.path" :style="'width:'+ frontBack?.body?.layersObject?.[0].imageSize?.[0] +';height:' + frontBack?.body?.layersObject?.[0].imageSize?.[0] +';'">
|
<img class="perview_img" @load="setPrintSize()" ref="detailBody" :key="designDetail.designItemId" :src="frontBack?.body?.path" :style="'width:'+ frontBack?.body?.layersObject?.[0].imageSize?.[0] +';height:' + frontBack?.body?.layersObject?.[0].imageSize?.[0] +';'">
|
||||||
<div class="detail_modal_item_front" v-for="item,index in frontBack.front" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))" @click="setpitch(item,index)" :style="item.style">
|
<div class="detail_modal_item_front" v-for="item,index in frontBack.front" @mousedown.stop="itemMoveMousedown(index,getMousePosition($event,false))" @touchstart.passive="itemMoveMousedown(index,getMousePosition($event,true))" @click="setpitch(item,index)" :style="item.style">
|
||||||
<img :src="item.imageUrl" alt="">
|
<img :src="item.imageUrl" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
deleteFile(item: any) {
|
deleteFile(item: any) {
|
||||||
if(item.type_.type1 == 'generate' || item.type_.type1 == 'material'){
|
if(item?.type_?.type1 == 'generate' || item?.type_?.type1 == 'material'){
|
||||||
item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:8})
|
item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:8})
|
||||||
item.state = 'delete'
|
item.state = 'delete'
|
||||||
this.store.commit("addGenerateMaterialFils", item);
|
this.store.commit("addGenerateMaterialFils", item);
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ export default defineComponent({
|
|||||||
deleteFile(item:any){
|
deleteFile(item:any){
|
||||||
// this.fileList.splice(item, 1)
|
// this.fileList.splice(item, 1)
|
||||||
// this.store.commit('setPrintboardFile',this.fileList)
|
// this.store.commit('setPrintboardFile',this.fileList)
|
||||||
if(item.type_.type1 == 'generate' || item.type_.type1 == 'material'){
|
if(item?.type_?.type1 == 'generate' || item?.type_?.type1 == 'material'){
|
||||||
item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:16})
|
item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:16})
|
||||||
item.state = 'delete'
|
item.state = 'delete'
|
||||||
this.store.commit("addGenerateMaterialFils", item);
|
this.store.commit("addGenerateMaterialFils", item);
|
||||||
@@ -610,7 +610,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
this.fileList.push(data)
|
this.fileList.push(data)
|
||||||
}
|
}
|
||||||
console.log(this.fileList)
|
|
||||||
this.store.commit('setPrintboardFile',this.fileList)
|
this.store.commit('setPrintboardFile',this.fileList)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -124,6 +124,14 @@ export default defineComponent({
|
|||||||
designType:props.item.resData.designType,
|
designType:props.item.resData.designType,
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
rv.imgUrl = rv.url
|
||||||
|
rv.category = props.item.category
|
||||||
|
rv.categoryValue = props.item.categoryValue
|
||||||
|
rv.resData = {
|
||||||
|
id:rv.id,
|
||||||
|
url:rv.url,
|
||||||
|
designType:props.item.resData.designType,
|
||||||
|
}
|
||||||
props.list.unshift(rv)
|
props.list.unshift(rv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2117,13 +2117,14 @@ export default defineComponent({
|
|||||||
type: string
|
type: string
|
||||||
) {
|
) {
|
||||||
// if()
|
// if()
|
||||||
if(this.isMove)return
|
if(this.isMove || this.isShowMark)return
|
||||||
this.store.commit('setOpenChatStatus',false)
|
this.store.commit('setOpenChatStatus',false)
|
||||||
if(design.resultType != "Design"){
|
if(design.resultType != "Design"){
|
||||||
this.selectEditBtn = design
|
this.selectEditBtn = design
|
||||||
this.setEditDesignType(collectionList,index,design.resultType,'edit',type)
|
this.setEditDesignType(collectionList,index,design.resultType,'edit',type)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.isShowMark = true
|
||||||
design.designOutfitId = design.designPythonOutfitId?design.designPythonOutfitId:design.designOutfitId
|
design.designOutfitId = design.designPythonOutfitId?design.designPythonOutfitId:design.designOutfitId
|
||||||
let data = {
|
let data = {
|
||||||
design: design,
|
design: design,
|
||||||
@@ -2134,7 +2135,9 @@ export default defineComponent({
|
|||||||
this.detailDestroy = true
|
this.detailDestroy = true
|
||||||
nextTick(()=>{
|
nextTick(()=>{
|
||||||
let designDetail: any = this.$refs.designDetail;
|
let designDetail: any = this.$refs.designDetail;
|
||||||
designDetail.showDesignDetailModal(data);
|
designDetail.showDesignDetailModal(data).then(()=>{
|
||||||
|
this.isShowMark = false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,21 @@ const DesignDetail : Module<DesignDetail,RootState> = {
|
|||||||
currentPrintElement:null,
|
currentPrintElement:null,
|
||||||
},
|
},
|
||||||
mutations:{
|
mutations:{
|
||||||
|
clearDetailData(state){
|
||||||
|
state.designDetail = null
|
||||||
|
state.designPreviewData = {}
|
||||||
|
state.frontBack = {
|
||||||
|
front:[],
|
||||||
|
back:[],
|
||||||
|
body:{},
|
||||||
|
}
|
||||||
|
state.selectDetail = null
|
||||||
|
state.printZIndex = -1
|
||||||
|
state.currentDetailType = ''
|
||||||
|
state.currentPrintElement = null
|
||||||
|
},
|
||||||
setDesignDetail(state,data){
|
setDesignDetail(state,data){
|
||||||
|
console.log(data)
|
||||||
if(data.others.length > 0 && data.others[0].type == "Body"){
|
if(data.others.length > 0 && data.others[0].type == "Body"){
|
||||||
state.frontBack.body = data.others[0]
|
state.frontBack.body = data.others[0]
|
||||||
}
|
}
|
||||||
@@ -74,7 +88,6 @@ const DesignDetail : Module<DesignDetail,RootState> = {
|
|||||||
state.frontBack.back = back
|
state.frontBack.back = back
|
||||||
},
|
},
|
||||||
updataDetailItem(state,data){
|
updataDetailItem(state,data){
|
||||||
console.log(data)
|
|
||||||
state.designDetail.clothes.forEach((item:any) => {
|
state.designDetail.clothes.forEach((item:any) => {
|
||||||
if(item.id == state.selectDetail.id){
|
if(item.id == state.selectDetail.id){
|
||||||
for (const key in data) {
|
for (const key in data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user