初代测试版本
This commit is contained in:
@@ -29,6 +29,11 @@
|
||||
<!-- <img class="detial_img" :src="designItemDetail.designItemUrl"> -->
|
||||
|
||||
<div v-show="imgDesignImg" class="detail_modal_body">
|
||||
<div class="detail_modal_body_nav">
|
||||
<div v-for="item,index in designItemDetail?.clothes" :class="{active:item.clothesOpen}" @click="clothesOpen(index)">
|
||||
<img :src="item?.path" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail_modal_item_back" :class="{active:body}" v-for="item,index in frontBack.back" :style="item.style">
|
||||
<img :src="item.imageUrl" alt="">
|
||||
</div>
|
||||
@@ -390,6 +395,7 @@ export default defineComponent({
|
||||
setSubmitItem(str:any){
|
||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||
let clothes:any = []
|
||||
|
||||
designItemDetail.clothes.forEach((item:any) => {
|
||||
let clothesItem = {
|
||||
color: `${item.color.r} ${item.color.g} ${item.color.b}`,
|
||||
@@ -420,6 +426,7 @@ export default defineComponent({
|
||||
}else{
|
||||
data.isPreview = false
|
||||
}
|
||||
this.store.commit('setDesignPreviewData',data)
|
||||
return data
|
||||
},
|
||||
setSubmit(str:any){
|
||||
@@ -528,13 +535,22 @@ export default defineComponent({
|
||||
mouseupDesignImg(){
|
||||
this.imgDesignImg = true
|
||||
},
|
||||
|
||||
clothesOpen(index:any){
|
||||
this.clothesDetail('',index)
|
||||
},
|
||||
clothesOpenActive(index:any){
|
||||
this.designItemDetail.clothes.forEach((item:any)=>{
|
||||
item.clothesOpen = false
|
||||
})
|
||||
this.designItemDetail.clothes[index].clothesOpen = true
|
||||
},
|
||||
//元素替换
|
||||
clothesDetail(clothes:any, index:number){
|
||||
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
|
||||
this.currentIndex = index
|
||||
this.designOrder = true
|
||||
this.current = designItemDetail.clothes[this.currentIndex]
|
||||
this.clothesOpenActive(index)
|
||||
let data:any = this.setSubmitItem('preview')
|
||||
data.designSingleItemDTOList[this.currentIndex] = {
|
||||
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
|
||||
@@ -677,7 +693,36 @@ export default defineComponent({
|
||||
.detail_modal_body{
|
||||
position: relative;
|
||||
// max-width: 245px;
|
||||
width: 100%;
|
||||
// width: 100%;
|
||||
height: 100%;
|
||||
.detail_modal_body_nav{
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
z-index: 999;
|
||||
transform: translateX(-50%);
|
||||
>div{
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
img{
|
||||
// width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
&.active{
|
||||
border: 2px solid rgba(0,0,0,0.4);
|
||||
img{
|
||||
transform: scale(.8);
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
}
|
||||
>div:nth-child(1){
|
||||
margin-right: 1rem;
|
||||
}
|
||||
}
|
||||
.detail_modal_item_front:last-child{
|
||||
z-index: 1 !important;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
class="select_category"
|
||||
@click.stop="showFileCategory(file)"
|
||||
>
|
||||
{{ getSketchLabel(file.level2Type) }}
|
||||
{{ file.level2Type }}
|
||||
<div
|
||||
:class="[
|
||||
'icon',
|
||||
@@ -143,6 +143,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="total > clothesList.length" class="material_content_list_loding" v-observe>
|
||||
<img src="@/assets/images/homePage/loading.gif" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="no_data_block loading_block" v-show="isShowLoading">
|
||||
<a-spin size="large"></a-spin>
|
||||
@@ -297,6 +300,9 @@ export default defineComponent({
|
||||
label: "Skirt",
|
||||
},
|
||||
]
|
||||
let total = ref(0)
|
||||
let pageSize = ref(10)
|
||||
let currentPage = ref(1)
|
||||
|
||||
let isShowLoading = ref(false)
|
||||
let clothesList = ref([])
|
||||
@@ -318,6 +324,9 @@ export default defineComponent({
|
||||
openClick,
|
||||
searchPictureName,
|
||||
disignTypeList,
|
||||
total,
|
||||
pageSize,
|
||||
currentPage,
|
||||
isShowLoading,
|
||||
clothesList,
|
||||
uploadList,
|
||||
@@ -374,7 +383,30 @@ export default defineComponent({
|
||||
workspaceCom:{}
|
||||
}
|
||||
},
|
||||
|
||||
directives:{
|
||||
observe:{
|
||||
mounted (el,binding) {
|
||||
// console.log(binding.instance);
|
||||
const ob = new IntersectionObserver(callback,{
|
||||
root:null,
|
||||
threshold:[.5]
|
||||
})
|
||||
ob.observe(el)
|
||||
// this.currentPage = 1
|
||||
// this.pageSize = 12
|
||||
let this_ = binding.instance
|
||||
function callback(entries, observer) {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
console.log(11);
|
||||
this_.getLibraryList()
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
computed:{
|
||||
getSketchLabel(value) {
|
||||
return (value) => {
|
||||
@@ -630,19 +662,23 @@ export default defineComponent({
|
||||
},
|
||||
//请求我的印花&&模型
|
||||
getLibraryList(){
|
||||
let workspace = this.store.state.Workspace.workspace
|
||||
let data = {
|
||||
level1Type:this.selectCode,
|
||||
// level2Type:this.designType,
|
||||
page:1,
|
||||
modelSex:workspace?.sex,
|
||||
page:this.currentPage,
|
||||
pictureName:this.searchPictureName,
|
||||
size:10,
|
||||
size:this.pageSize+this.clothesList.length,
|
||||
}
|
||||
this.isShowLoading = true
|
||||
|
||||
Https.axiosPost(Https.httpUrls.queryLibraryPage,data).then(
|
||||
(rv) => {
|
||||
|
||||
this.clothesList = rv.content
|
||||
this.isShowLoading = false
|
||||
this.total = rv.total
|
||||
}
|
||||
).catch((res)=>{
|
||||
this.isShowLoading = false
|
||||
@@ -990,6 +1026,13 @@ export default defineComponent({
|
||||
&.scroll_style::-webkit-scrollbar{display: none;}
|
||||
|
||||
}
|
||||
.material_content_list_loding{
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
img{
|
||||
height: 10rem;
|
||||
}
|
||||
}
|
||||
.content_img_item{
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
|
||||
@@ -165,7 +165,7 @@ export default defineComponent({
|
||||
return `${value*3}%`;
|
||||
},
|
||||
setPrint(){
|
||||
if(this.current.printObject.prints[0].path){
|
||||
if(this.current?.printObject?.prints?.[0]?.path){
|
||||
let DesignPrintOperation = this.$refs.DesignPrintOperation
|
||||
DesignPrintOperation.init()
|
||||
}else{
|
||||
|
||||
@@ -246,19 +246,18 @@ export default defineComponent({
|
||||
this.printStyleList[0].style.width = print.width+'px'
|
||||
this.printStyleList[0].style.height = print.height+'px'
|
||||
this.printStyleList[0].designOpenrtionBtn = false
|
||||
if(this.overallSingle){
|
||||
nextTick().then(()=>{
|
||||
if(this.designOpenrtionList[0].scale){
|
||||
this.designOpenrtionList.forEach((item,index)=>{
|
||||
this.setTemplate(item,index)
|
||||
this.printAmount = this.printStyleList.length
|
||||
nextTick().then(()=>{
|
||||
if(this.designOpenrtionList[0].scale){
|
||||
this.designOpenrtionList.forEach((item,index)=>{
|
||||
this.setTemplate(item,index)
|
||||
this.printAmount = this.printStyleList.length
|
||||
|
||||
})
|
||||
}else{
|
||||
this.refetchTemplate(0)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.refetchTemplate(0)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
@@ -548,7 +547,8 @@ export default defineComponent({
|
||||
arr.forEach((v,index)=>{
|
||||
if(!this.overallSingle){
|
||||
scale = this.systemDesignerPercentage*3/100
|
||||
location = [arr[index].style.left.replace(/px/g,'')*sketchNum+this.print.width.replace(/px/g,'')/2-7,arr[index].style.top.replace(/px/g,'')*sketchNum+this.print.height.replace(/px/g,'')/2-7]
|
||||
// location = [arr[index].style.left.replace(/px/g,'')*sketchNum+this.print.width.replace(/px/g,'')/2-7,arr[index].style.top.replace(/px/g,'')*sketchNum+this.print.height.replace(/px/g,'')/2-7]
|
||||
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
|
||||
}else{
|
||||
scale = (arr[index].style.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
|
||||
location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
|
||||
@@ -557,7 +557,7 @@ export default defineComponent({
|
||||
angle : !this.overallSingle ? 0:arr[index].transform.rotateZ,
|
||||
location : location,
|
||||
priority:arr[index].style.zIndex,
|
||||
scale: !this.overallSingle? 1:scale,
|
||||
scale: scale,
|
||||
path:this.designOpenrtionList[index].path,
|
||||
minIOPath:this.designOpenrtionList[index].minIOPath,
|
||||
}
|
||||
|
||||
@@ -159,7 +159,8 @@ import { defineComponent, createVNode, ref,Ref} from "vue";
|
||||
import { UserOutlined, DownOutlined } from "@ant-design/icons-vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import type { MenuProps } from "ant-design-vue";
|
||||
import { message,Upload} from 'ant-design-vue';
|
||||
import { Modal,message,Upload} from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
export default defineComponent({
|
||||
components: {
|
||||
DownOutlined,
|
||||
@@ -220,7 +221,8 @@ export default defineComponent({
|
||||
this.workspaceItem.position = 'Overall'
|
||||
}
|
||||
let data = this.workspaceItem
|
||||
this.putWorkspace(data)
|
||||
delete data.isLastIndex
|
||||
this.putWorkspace(data,'')
|
||||
this.store.commit("setWorkspace", this.workspaceItem);
|
||||
}
|
||||
}
|
||||
@@ -237,11 +239,12 @@ export default defineComponent({
|
||||
this.workspaceItem.id_ = v.id
|
||||
}
|
||||
if(v.id == oldVal){
|
||||
this.getDetail(newVal)
|
||||
delete v.isLastIndex
|
||||
this.putWorkspace(v)
|
||||
this.putWorkspace(v,newVal)
|
||||
// this.getDetail(newVal)
|
||||
}
|
||||
})
|
||||
this.getMannequins()
|
||||
}
|
||||
},
|
||||
workspaceItem:{
|
||||
@@ -393,14 +396,27 @@ export default defineComponent({
|
||||
getMannequins(){//获取模特
|
||||
Https.axiosGet(Https.httpUrls.getMannequins,{params:{sex:this.workspaceItem.sex}}).then((rv: any) => {
|
||||
if (rv) {
|
||||
// rv.forEach((item:any)=>{
|
||||
// item.type ==
|
||||
// })
|
||||
if(rv[0].type == 'System'){
|
||||
let a = rv[0]
|
||||
rv[0] = rv[1]
|
||||
rv[1] = a
|
||||
}
|
||||
this.mannequins = rv
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
putWorkspace(data:any){//修改workspace
|
||||
putWorkspace(data:any,index:any){//修改workspace
|
||||
console.log(index);
|
||||
|
||||
Https.axiosPost(Https.httpUrls.workspacesaveOrUpdate,data).then((rv: any) => {
|
||||
if (rv) {
|
||||
if(index){
|
||||
this.getDetail(index)
|
||||
}
|
||||
this.getworkspace()
|
||||
}
|
||||
})
|
||||
@@ -417,8 +433,30 @@ export default defineComponent({
|
||||
if(this.workspaceItem.overallSingle){
|
||||
this.workspaceItem.position = this.singleTypeList[0].label
|
||||
}else{
|
||||
this.workspaceItem.position = 'Overall'
|
||||
}
|
||||
},
|
||||
|
||||
cancelDsign(index:any){
|
||||
let _this = this
|
||||
Modal.confirm({
|
||||
title: 'Whether to delete the workspace?',
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
okText: 'Yes',
|
||||
cancelText: 'No',
|
||||
mask:false,
|
||||
wrapClassName:'habit',
|
||||
zIndex:999999999,
|
||||
// centered:true,
|
||||
onOk() {
|
||||
let data = [{
|
||||
id:_this.workspace.workspaceList[index].id,
|
||||
}]
|
||||
let id = _this.workspace.workspaceList[index].id
|
||||
_this.deleteWorkspace(data)
|
||||
}
|
||||
});
|
||||
},
|
||||
//修改名字
|
||||
putName(index:number,v:string){
|
||||
this.workspace.workspaceList.forEach((v:any )=> {
|
||||
@@ -428,12 +466,12 @@ export default defineComponent({
|
||||
this.workspaceItemName = this.workspace.workspaceList[index].workSpaceName
|
||||
this.workspace.workspaceList[index].putName = true
|
||||
}else if (v == 'delete'){
|
||||
let data = [{
|
||||
id:this.workspace.workspaceList[index].id,
|
||||
}]
|
||||
let id = this.workspace.workspaceList[index].id
|
||||
this.deleteWorkspace(data)
|
||||
|
||||
this.cancelDsign(index)
|
||||
// let data = [{
|
||||
// id:this.workspace.workspaceList[index].id,
|
||||
// }]
|
||||
// let id = this.workspace.workspaceList[index].id
|
||||
// this.deleteWorkspace(data)
|
||||
}else{
|
||||
if(this.workspaceItemName == ''){
|
||||
message.warning('Please enter a workbench name');
|
||||
@@ -442,7 +480,7 @@ export default defineComponent({
|
||||
let data = {
|
||||
workSpaceName:this.workspaceItemName,
|
||||
}
|
||||
this.putWorkspace(data)
|
||||
this.putWorkspace(data,'')
|
||||
this.openType.addWorkspace = false
|
||||
}else{
|
||||
let data:any
|
||||
@@ -452,7 +490,7 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
data.workSpaceName = this.workspaceItemName
|
||||
this.putWorkspace(data)
|
||||
this.putWorkspace(data,'')
|
||||
this.workspace.workspaceList[index].workSpaceName = this.workspaceItemName
|
||||
this.workspace.workspaceList[index].putName = false
|
||||
}
|
||||
@@ -499,6 +537,15 @@ export default defineComponent({
|
||||
// this.workspaceItem.mannequinId = item.id
|
||||
// this.workspaceItem.mannequinType = str
|
||||
// this.workspaceItem.mannequinUrl = item.presignedUrl
|
||||
if(this.workspaceItem.sex == 'Female'){
|
||||
this.workspaceItem.femalePresignedUrl = item.presignedUrl
|
||||
this.workspaceItem.mannequinFemaleType = str
|
||||
this.workspaceItem.mannequinFemaleId = item.id
|
||||
}else if(this.workspaceItem.sex == 'Male'){
|
||||
this.workspaceItem.malePresignedUrl = item.presignedUrl
|
||||
this.workspaceItem.mannequinMaleType = str
|
||||
this.workspaceItem.mannequinMaleId = item.id
|
||||
}
|
||||
this.workspaceItem.mannequinUrl = item.presignedUrl
|
||||
this.workspaceItem.mannequinType = str
|
||||
this.workspaceItem.mannequinId = item.id
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="design_compile_content">
|
||||
<div class="design_compile_content" id="design_compile_content">
|
||||
<div class="designOpenrtion_centent" id="designOpenrtionCentent">
|
||||
<div class="designOpenrtion_imgMask" :style="frontBack?.body?.style">
|
||||
<!-- <div
|
||||
@@ -30,6 +30,7 @@
|
||||
</div>
|
||||
<div @click="setPreviewData" class="subitOkPreviewBtn">OK</div>
|
||||
</div>
|
||||
<div class="designOpenrtion_imgMask_open" @click.stop="deleteBorder"></div>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
@@ -331,6 +332,11 @@ export default defineComponent({
|
||||
setPreviewData(){
|
||||
this.$emit('setSubmit','preview');
|
||||
},
|
||||
deleteBorder(){
|
||||
this.frontBack?.front?.forEach((item)=>{
|
||||
item.designOpenrtionBtn = false
|
||||
})
|
||||
},
|
||||
async setPreview(data){
|
||||
let ratio = this.frontBack.body.layersObject[0].imageSize[0]/this.frontBack.body.style.width.replace(/px/g,'')
|
||||
let designItemDetail = this.store.state.DesignDetailModule.designItemDetail
|
||||
@@ -389,120 +395,15 @@ export default defineComponent({
|
||||
i.layersObject = item.layersObject
|
||||
}
|
||||
})
|
||||
// data.designSingleItemDTOList.front.forEach((i)=>{
|
||||
// if(item.type === i.type){
|
||||
// // item.position = [
|
||||
// // item.position[0] += left,
|
||||
// // item.position[1] += top
|
||||
// // ]
|
||||
// console.log(item.position,left ,top);
|
||||
// i.layersObject = item.layersObject
|
||||
// }
|
||||
// })
|
||||
|
||||
})
|
||||
this.$emit('setDesignCoverage');
|
||||
this.store.commit("setDesignItemDetail", designItemDetail);
|
||||
// let designCollectionList = this.store.state.HomeStoreModule.designCollectionList
|
||||
// let likeDesignCollectionList = this.store.state.HomeStoreModule.likeDesignCollectionList
|
||||
// designCollectionList.forEach((item) => {
|
||||
// if(item.designItemId == rv.designItemId){
|
||||
// item.designOutfitUrl = rv.designItemUrl
|
||||
// }
|
||||
// });
|
||||
// likeDesignCollectionList.forEach((item) => {
|
||||
// if(item.designItemId == rv.designItemId){
|
||||
// item.designOutfitUrl = rv.designItemUrl
|
||||
// }
|
||||
// });
|
||||
// this.store.commit('setDesignCollectionList',designCollectionList)
|
||||
// this.store.commit('setLikeDesignCollectionList',likeDesignCollectionList)
|
||||
|
||||
}
|
||||
).catch(res=>{
|
||||
this.loadingShow = false
|
||||
});
|
||||
//顺序不能乱
|
||||
// let arr = [...this.frontBack.front,...this.frontBack.back,...this.frontBack.body.layersObject]
|
||||
// let layers=[]
|
||||
// let num = 0
|
||||
// let front = this.frontBack.back.length+2
|
||||
// let back = this.frontBack.back.length-1
|
||||
// let str
|
||||
// arr.forEach(item => {
|
||||
// let obj
|
||||
// if(item.imageCategory == 'body'){
|
||||
// obj = item
|
||||
// obj.priority = this.frontBack.back.length+1
|
||||
// }else{
|
||||
// str = str?str:item?.imageCategory.split('_')[0]
|
||||
// obj = {
|
||||
// id:item.id,
|
||||
// imageCategory:item.imageCategory,
|
||||
// scale:item?.imageSize?Number(((item?.style?.width.replace(/px/g,'')*ratio)/item?.imageSize[0]).toFixed(2)):1,
|
||||
// position:[Number((item?.style?.top?.replace(/px/g,'')*ratio).toFixed(0)),Number((item?.style?.left?.replace(/px/g,'')*ratio).toFixed(0))],
|
||||
// imageSize: item.imageSize,
|
||||
// priority:item.style.zIndex,
|
||||
// }
|
||||
// if(item?.imageCategory?.indexOf("front") == -1){
|
||||
// // if(str == item?.imageCategory.split('_')[0])
|
||||
// if(str == item?.imageCategory.split('_')[0]){
|
||||
// num = 0
|
||||
// back = this.frontBack.back.length-1
|
||||
// }else{
|
||||
// num = 1
|
||||
// back++
|
||||
// }
|
||||
// obj.scale = layers[num].scale
|
||||
// obj.position = layers[num].position
|
||||
// obj.imageSize = layers[num].imageSize
|
||||
// obj.priority = back
|
||||
// }else{
|
||||
// obj.priority = front++
|
||||
// }
|
||||
|
||||
// }
|
||||
// obj.imageUrl = item.imageMinioUrl
|
||||
// obj.maskUrl = item.maskMinioUrl
|
||||
// layers.push(obj)
|
||||
// });
|
||||
// console.log(layers);
|
||||
// let data = {
|
||||
// layers:{
|
||||
// designItemId:designItemDetail.designItemId,
|
||||
// designItemUrl:designItemDetail.designItemUrl,
|
||||
// layers:layers
|
||||
// },
|
||||
// timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
// }
|
||||
|
||||
// this.loadingShow = true
|
||||
// Https.axiosPost(Https.httpUrls.designSingle, data).then(
|
||||
// (rv) => {
|
||||
// // let top,bottom
|
||||
// // let desingStr0 = designItemDetail.clothes[0].type
|
||||
// // let desingStr1 = designItemDetail.clothes[1].type
|
||||
// // rv.layers.forEach((item)=>{
|
||||
// // let str = this.capitalizeFirstLetter(item.imageCategory)
|
||||
// // if(str.split('_')[0] == desingStr0){
|
||||
// // top.push(item)
|
||||
// // }else if(str.split('_')[0] == desingStr1){
|
||||
// // bottom.push(item)
|
||||
// // }
|
||||
// // })
|
||||
// // console.log(rv,designItemDetail);
|
||||
// // designItemDetail.clothes[0]
|
||||
// // designItemDetail.clothes.forEach((item)=>{
|
||||
// // if(item.type == desingStr0){
|
||||
// // item.layersObject = top
|
||||
// // }else if(item.type == desingStr1){
|
||||
// // item.layersObject = bottom
|
||||
// // }
|
||||
// // })
|
||||
// // this.store.commit("setDesignItemDetail", designItemDetail);
|
||||
// this.loadingShow = false
|
||||
// }
|
||||
// ).catch(res=>{
|
||||
// this.loadingShow = false
|
||||
// });
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -542,6 +443,7 @@ export default defineComponent({
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
user-select:none;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
&.active{
|
||||
flex-direction: row;
|
||||
@@ -675,5 +577,10 @@ export default defineComponent({
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
.designOpenrtion_imgMask_open{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -42,8 +42,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="img_block_item">
|
||||
<div class="lager_img_item" v-for="(skecth) in allBoardData.skecthboardFiles" :key="skecth">
|
||||
<div class="img_block_item img_block_item_sketch">
|
||||
<div class="lager_img_item" v-for="(skecth) in allBoardData.sketchboardFiles" :key="skecth">
|
||||
<div class="all_img_item_block">
|
||||
<img class="all_img_content" :src="skecth.imgUrl">
|
||||
</div>
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="img_block_item">
|
||||
<div class="img_block_item img_block_item_sketch h50">
|
||||
<div class="lager_img_item" v-for="(design) in likeDesignCollectionList" :key="design.designItemUrl">
|
||||
<div class="all_img_item_block">
|
||||
<img class="all_img_content" :src="design.designItemUrl">
|
||||
@@ -188,6 +188,20 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
}
|
||||
&.img_block_item_sketch{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
>div{
|
||||
width: 45%;
|
||||
height: 25rem;
|
||||
}
|
||||
}
|
||||
&.h50{
|
||||
.lager_img_item{
|
||||
height: 50rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,9 +61,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-if="selectCode == 'Sketchboard' || selectCode == 'Printboard'" class="pin_block">
|
||||
<div v-if="selectCode == 'Sketchboard' || selectCode == 'Printboard'" class="pin_block">
|
||||
<a-checkbox v-model:checked="item.pin">PIN</a-checkbox>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="total > imgList.length" class="material_content_list_loding" v-observe>
|
||||
<img src="@/assets/images/homePage/loading.gif" alt="">
|
||||
@@ -131,25 +131,25 @@ export default defineComponent({
|
||||
directives:{
|
||||
observe:{
|
||||
mounted (el,binding) {
|
||||
el.addEventListener('click',()=>{
|
||||
|
||||
// console.log(binding.instance);
|
||||
const ob = new IntersectionObserver(callback,{
|
||||
root:null,
|
||||
threshold:[0.1]
|
||||
})
|
||||
ob.observe(el)
|
||||
// this.currentPage = 1
|
||||
// this.pageSize = 12
|
||||
let this_:any = binding.instance
|
||||
function callback(entries:any, observer:any) {
|
||||
entries.forEach((entry:any) => {
|
||||
if (entry.isIntersecting) {
|
||||
this_.getLibraryList()
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// updated (el,model){
|
||||
// if(model.value){
|
||||
// el.style.display="block"
|
||||
// setTimeout(() => {
|
||||
// el.classList.add("active")
|
||||
// }, 100);
|
||||
// }else{
|
||||
// el.classList.remove("active")
|
||||
// setTimeout(() => {
|
||||
// el.style.display="none"
|
||||
// }, 100);
|
||||
// }
|
||||
// }
|
||||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
getSketchLabel(value:any) {
|
||||
@@ -178,26 +178,26 @@ export default defineComponent({
|
||||
this.workspaceCom = computed(()=>{
|
||||
return this.store?.state?.Workspace?.workspace
|
||||
})
|
||||
let loding = document.getElementsByClassName("material_content_list_loding")[0]
|
||||
let bodyLoding = document.getElementsByClassName("material_content_body")[0]
|
||||
const ob = new IntersectionObserver(callback,{
|
||||
root:null,
|
||||
threshold:[0.1]
|
||||
})
|
||||
ob.observe(loding)
|
||||
console.log(loding);
|
||||
// this.currentPage = 1
|
||||
// this.pageSize = 12
|
||||
// let this_ = this
|
||||
function callback(entries:any, observer:any) {
|
||||
entries.forEach((entry:any) => {
|
||||
if (entry.isIntersecting) {
|
||||
console.log(111);
|
||||
// this_.getLibraryList()
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
// let loding = document.getElementsByClassName("material_content_list_loding")[0]
|
||||
// let bodyLoding = document.getElementsByClassName("material_content_body")[0]
|
||||
// const ob = new IntersectionObserver(callback,{
|
||||
// root:null,
|
||||
// threshold:[0.1]
|
||||
// })
|
||||
// ob.observe(loding)
|
||||
// console.log(loding);
|
||||
// // this.currentPage = 1
|
||||
// // this.pageSize = 12
|
||||
// // let this_ = this
|
||||
// function callback(entries:any, observer:any) {
|
||||
// entries.forEach((entry:any) => {
|
||||
// if (entry.isIntersecting) {
|
||||
// console.log(111);
|
||||
// // this_.getLibraryList()
|
||||
// } else {
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
},
|
||||
watch:{
|
||||
workspaceCom(newVal,oldVal){
|
||||
@@ -303,9 +303,11 @@ export default defineComponent({
|
||||
|
||||
//选择所有的图片
|
||||
getLibraryList(){
|
||||
let workspace = this.store.state.Workspace.workspace
|
||||
let data = {
|
||||
level1Type:this.selectCode,
|
||||
// level2Type:this.designType,
|
||||
modelSex:workspace?.sex,
|
||||
page:this.currentPage,
|
||||
pictureName:this.searchPictureName,
|
||||
size:this.pageSize+this.imgList.length,
|
||||
|
||||
@@ -197,6 +197,11 @@ export default defineComponent({
|
||||
height: 25rem;
|
||||
}
|
||||
}
|
||||
&.h30{
|
||||
.lager_img_item{
|
||||
height: 50rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -124,14 +124,14 @@ export const Https = {
|
||||
pictureLikeOrUnLike:`/api/python/pictureLikeOrUnLike`,//机器人生成图喜欢
|
||||
getBloodBars:`/api/python/getBloodBars`,//机器人血条
|
||||
|
||||
workspaceDetail:`/api/workspace/detail`,//用户习惯详情
|
||||
workspaceDetail:`${httpIp}/api/workspace/detail`,//用户习惯详情
|
||||
workspaceenumValues:`/api/workspace/enumValues`,//getSex
|
||||
|
||||
workspaceRemove:`/api/workspace/remove`,//删除用户习惯详情
|
||||
workspacesaveOrUpdate:`/api/workspace/saveOrUpdate`,//修改用户习惯详情
|
||||
getMannequins:`/api/workspace/getMannequins`,//模特
|
||||
workspaceRemove:`${httpIp}/api/workspace/remove`,//删除用户习惯详情
|
||||
workspacesaveOrUpdate:`${httpIp}/api/workspace/saveOrUpdate`,//修改用户习惯详情
|
||||
getMannequins:`${httpIp}/api/workspace/getMannequins`,//模特
|
||||
|
||||
workspaceList:`/api/workspace/list`,
|
||||
workspaceList:`${httpIp}/api/workspace/list`,
|
||||
sketchAndPrintGenerate:'/api/generate/sketchAndPrint',//sketchGenerate生成图片
|
||||
generateLike:'/api/generate/like',//喜欢ganerate图片
|
||||
generateDislike:'/api/generate/dislike',//喜欢ganerate图片
|
||||
|
||||
@@ -72,6 +72,9 @@ function rgbToHsv([R, G, B]) {
|
||||
H = (R - G) / delta + 4;
|
||||
}
|
||||
H = Math.round(H * 60); // 范围为 0-360
|
||||
if(H<0){
|
||||
H = 360+H
|
||||
}
|
||||
if (max === 0) {
|
||||
S = 0;
|
||||
} else {
|
||||
|
||||
@@ -314,12 +314,12 @@ export default defineComponent({
|
||||
})
|
||||
el.addEventListener('mousewheel',(e:MouseEvent)=>{
|
||||
if(0>(e as WheelEvent).deltaY && width>parentWidth){
|
||||
num+=15
|
||||
num+=25
|
||||
if(num >= 0){
|
||||
num = 0
|
||||
}
|
||||
}else if(0<(e as WheelEvent).deltaY && width>parentWidth){
|
||||
num-=15
|
||||
num-=25
|
||||
if(num<=parentWidth - width){
|
||||
num = parentWidth - width
|
||||
}
|
||||
@@ -445,7 +445,7 @@ export default defineComponent({
|
||||
rv.collectionId
|
||||
);
|
||||
this.store.commit("setDesignId", rv.designId);
|
||||
this.designProgress = 0;
|
||||
// this.designProgress = 0;
|
||||
this.startDesignType = "design";
|
||||
}
|
||||
})
|
||||
@@ -475,8 +475,8 @@ export default defineComponent({
|
||||
"setDesignCollectionList",
|
||||
rv.designCollectionItems
|
||||
);
|
||||
(this.designProgress = 0),
|
||||
(this.startDesignType = "resDesign");
|
||||
// this.designProgress = 0,
|
||||
this.startDesignType = "resDesign";
|
||||
}
|
||||
})
|
||||
.catch((res) => {
|
||||
@@ -810,6 +810,8 @@ export default defineComponent({
|
||||
imgUrl: URL.createObjectURL(blob),
|
||||
name: "collection.png",
|
||||
})
|
||||
console.log(URL.createObjectURL(blob));
|
||||
|
||||
for (let key in allBoardData) {
|
||||
if (key !== "colorBoards" && key !== "moodTemplateId") {
|
||||
for (let item of allBoardData[key]) {
|
||||
|
||||
@@ -239,11 +239,10 @@ export default defineComponent({
|
||||
store
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
async mounted(){
|
||||
this.uploadUrl = getUploadUrl()
|
||||
this.getLibraryList()
|
||||
this.getSex()
|
||||
this.getPosition()
|
||||
},
|
||||
methods:{
|
||||
|
||||
@@ -260,6 +259,7 @@ export default defineComponent({
|
||||
});
|
||||
this.sex = arr[0].value
|
||||
this.sexList = arr
|
||||
this.getPosition()
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -303,8 +303,9 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
|
||||
sexChange(){
|
||||
this.getPosition()
|
||||
async sexChange(){
|
||||
await this.getPosition()
|
||||
this.getLibraryList()
|
||||
},
|
||||
handleChange(){
|
||||
this.getLibraryList()
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = defineConfig({
|
||||
// changeOrigin: true, //是否允许跨越
|
||||
// }
|
||||
'/api':{
|
||||
target:'http://18.167.251.121:10086',
|
||||
target:'http://192.168.1.7:5567',
|
||||
changeOrigin:true,
|
||||
},
|
||||
'/robot':{
|
||||
|
||||
Reference in New Issue
Block a user