diff --git a/src/component/Detail/DesignDetail.vue b/src/component/Detail/DesignDetail.vue
index 395e03cb..ba490c94 100644
--- a/src/component/Detail/DesignDetail.vue
+++ b/src/component/Detail/DesignDetail.vue
@@ -29,6 +29,11 @@
+
+
+
![]()
+
+
@@ -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;
}
diff --git a/src/component/Detail/DesignDetailAlter.vue b/src/component/Detail/DesignDetailAlter.vue
index b0be52f8..d9a00724 100644
--- a/src/component/Detail/DesignDetailAlter.vue
+++ b/src/component/Detail/DesignDetailAlter.vue
@@ -107,7 +107,7 @@
class="select_category"
@click.stop="showFileCategory(file)"
>
- {{ getSketchLabel(file.level2Type) }}
+ {{ file.level2Type }}
clothesList.length" class="material_content_list_loding" v-observe>
+

+
@@ -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;
diff --git a/src/component/Detail/DesignDetailEnd.vue b/src/component/Detail/DesignDetailEnd.vue
index 924fc12e..fb266f34 100644
--- a/src/component/Detail/DesignDetailEnd.vue
+++ b/src/component/Detail/DesignDetailEnd.vue
@@ -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{
diff --git a/src/component/Detail/DesignPrintOperation.vue b/src/component/Detail/DesignPrintOperation.vue
index c6a97310..77f38596 100644
--- a/src/component/Detail/DesignPrintOperation.vue
+++ b/src/component/Detail/DesignPrintOperation.vue
@@ -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,
}
diff --git a/src/component/Detail/habit.vue b/src/component/Detail/habit.vue
index 8f90088a..9601d5dd 100644
--- a/src/component/Detail/habit.vue
+++ b/src/component/Detail/habit.vue
@@ -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
diff --git a/src/component/Detail/setDesignItem.vue b/src/component/Detail/setDesignItem.vue
index de9b9956..1866682c 100644
--- a/src/component/Detail/setDesignItem.vue
+++ b/src/component/Detail/setDesignItem.vue
@@ -1,5 +1,5 @@
-
+

@@ -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,
diff --git a/src/component/HomePage/NewCollectionReview.vue b/src/component/HomePage/NewCollectionReview.vue
index db04f6dc..e87a50b3 100644
--- a/src/component/HomePage/NewCollectionReview.vue
+++ b/src/component/HomePage/NewCollectionReview.vue
@@ -197,6 +197,11 @@ export default defineComponent({
height: 25rem;
}
}
+ &.h30{
+ .lager_img_item{
+ height: 50rem;
+ }
+ }
}
}
diff --git a/src/tool/https.js b/src/tool/https.js
index 05b802db..05ac597a 100644
--- a/src/tool/https.js
+++ b/src/tool/https.js
@@ -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图片
diff --git a/src/tool/util.js b/src/tool/util.js
index 935e5332..cd507f15 100644
--- a/src/tool/util.js
+++ b/src/tool/util.js
@@ -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 {
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index b5a1222b..18a75b44 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -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]) {
diff --git a/src/views/LibraryPage.vue b/src/views/LibraryPage.vue
index ad4b2ff1..bdc40e97 100644
--- a/src/views/LibraryPage.vue
+++ b/src/views/LibraryPage.vue
@@ -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()
diff --git a/vue.config.js b/vue.config.js
index 613b74d6..872c6fda 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -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':{