This commit is contained in:
X1627315083
2023-12-19 16:36:48 +08:00
parent c50c6e76f9
commit 904b9856fd
18 changed files with 103 additions and 40 deletions

View File

@@ -65,7 +65,7 @@
<a-checkbox v-model:checked="item.pin">{{ $t('Material.PIN') }}</a-checkbox> <a-checkbox v-model:checked="item.pin">{{ $t('Material.PIN') }}</a-checkbox>
</div> </div>
</div> </div>
<div v-show="total > imgList?.length" class="material_content_list_loding" v-observe> <div v-show="total > imgList?.length && total != 0" class="material_content_list_loding" v-observe>
<img src="@/assets/images/homePage/loading.gif" alt=""> <img src="@/assets/images/homePage/loading.gif" alt="">
</div> </div>
</div> </div>
@@ -95,6 +95,7 @@ export default defineComponent({
let selectCode:any = ref('') let selectCode:any = ref('')
let currentPage:any = ref(1) let currentPage:any = ref(1)
let searchPictureName = ref('') let searchPictureName = ref('')
let isOldSearchPictureName = ref('')
let pageSize = ref(12) let pageSize = ref(12)
let total = ref(0) let total = ref(0)
let searcMaterialhName:any = ref('') //搜索名字 let searcMaterialhName:any = ref('') //搜索名字
@@ -112,6 +113,7 @@ export default defineComponent({
selectCode, selectCode,
currentPage, currentPage,
searchPictureName, searchPictureName,
isOldSearchPictureName,
pageSize, pageSize,
total, total,
searcMaterialhName, searcMaterialhName,
@@ -287,6 +289,7 @@ export default defineComponent({
this.isShowLoading = true this.isShowLoading = true
Https.axiosPost(Https.httpUrls.queryLibraryPage,data).then( Https.axiosPost(Https.httpUrls.queryLibraryPage,data).then(
(rv: any) => { (rv: any) => {
this.total = rv.total
let aa:any = [] let aa:any = []
rv.content.forEach((item:any,index:any) => { rv.content.forEach((item:any,index:any) => {
let arr let arr
@@ -315,13 +318,16 @@ export default defineComponent({
} }
aa.push(item) aa.push(item)
}); });
if(aa[aa.length-1].id == this.imgList[this.imgList.length-1]?.id){ if(this.searchPictureName != this.isOldSearchPictureName){
this.imgList = []
}else{
}
this.isOldSearchPictureName = this.searchPictureName
if((aa[aa.length-1].id == this.imgList[this.imgList.length-1]?.id) && aa?.[aa.length-1]?.id){
}else{ }else{
this.imgList.push(...aa) this.imgList.push(...aa)
} }
// this.imgList = aa // this.imgList = aa
this.total = rv.total
this.isShowLoading = false this.isShowLoading = false
} }
).catch((res)=>{ ).catch((res)=>{

View File

@@ -97,9 +97,6 @@ export default defineComponent({
watch: { watch: {
sketchList:{ sketchList:{
handler(newVal:any,oldVal:any){ handler(newVal:any,oldVal:any){
console.log(oldVal,newVal);
console.log(this.sketchList );
// this.sketchList = [] // this.sketchList = []
// this.sketch = [[],[],[]] // this.sketch = [[],[],[]]
// this.sketchList = this.allBoardData.sketchboardFiles // this.sketchList = this.allBoardData.sketchboardFiles

View File

@@ -180,7 +180,7 @@ export default defineComponent({
} }
}); });
}, },
isPin(str:any){ isPin(str:any,resolve:any){
let _this = this let _this = this
Modal.confirm({ Modal.confirm({
title: this.t('collectionModal.jsContent5',{str:str}), title: this.t('collectionModal.jsContent5',{str:str}),
@@ -190,16 +190,17 @@ export default defineComponent({
mask:false, mask:false,
centered:true, centered:true,
onOk() { onOk() {
return true resolve(true)
// return true
}, },
onCancel(){ onCancel(){
_this.isShowMark = false _this.isShowMark = false
return false resolve(false)
} }
}); });
// message.warning(this.t('SketchboardUpload.jsContent1',str:str)); // message.warning(this.t('SketchboardUpload.jsContent1',str:str));
}, },
isPinOpen(list:any){ async isPinOpen(list:any){
this.workspace this.workspace
let numTop = 0 let numTop = 0
let numBottom = 0 let numBottom = 0
@@ -232,26 +233,32 @@ export default defineComponent({
numTop++ numTop++
} }
}); });
top.forEach((positionItem:any) => { bottom.forEach((positionItem:any) => {
if(item.category == positionItem && item.pin){ if(item.category == positionItem && item.pin){
numBottom++ numBottom++
} }
}); });
}); });
let str let bor
if(numTop >= 8){ await new Promise(async (resolve:any)=>{
str = `top ${topStr.join(' and ')}` let str
return this.isPin(str) if(numTop >= 8){
}else if(numBottom >= 8){ str = `top ${topStr.join(' and ')}`
str = `bottom ${bottomStr.join(' and ')}` this.isPin(str,resolve)
return this.isPin(str) return
}else{ }else if(numBottom >= 8){
return true str = `bottom ${bottomStr.join(' and ')}`
} this.isPin(str,resolve)
}else{
resolve(true)
}
}).then((v:any)=>{
bor = v
})
return bor
}, },
//完成 //完成
finishCollection(){ async finishCollection(){
this.isShowMark = true this.isShowMark = true
let sketchList = this.store.state.UploadFilesModule.sketchboard let sketchList = this.store.state.UploadFilesModule.sketchboard
let arr:any = [] let arr:any = []
@@ -265,8 +272,7 @@ export default defineComponent({
arr.push(obj) arr.push(obj)
}); });
let data = {sketchBoards:arr} let data = {sketchBoards:arr}
// console.log(this.position); if(!await this.isPinOpen(sketchList)){
if(!this.isPinOpen(sketchList)){
this.isShowMark = false this.isShowMark = false
return return
} }

View File

@@ -50,7 +50,7 @@
<div class="select_block"> <div class="select_block">
<a-select <a-select
ref="select" ref="select"
v-model:value="sex.label" v-model:value="sex.value"
:options="sexList" :options="sexList"
> >
<template #suffixIcon <template #suffixIcon

View File

@@ -50,7 +50,7 @@
<div class="select_block"> <div class="select_block">
<a-select <a-select
ref="select" ref="select"
v-model:value="sex.name" v-model:value="sex.value"
:options="sexList" :options="sexList"
> >
<template #suffixIcon <template #suffixIcon

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"调色板", colorboard:"调色板",
sketchboard:"素描板", sketchboard:"素描板",
mannequins:"人体模型", mannequins:"人体模型",
masnnequinHint:"您使用的模特与当前的衣服不匹配,这将导致生成的模型不使用所选的衣服",
jsContent1:'您必须选择一种或多种颜色进行下一步。', jsContent1:'您必须选择一种或多种颜色进行下一步。',
jsContent2:'您必须选择一种或多种颜色进行下一步。', jsContent2:'您必须选择一种或多种颜色进行下一步。',
jsContent3:'导出文件失败。', jsContent3:'导出文件失败。',

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"colorboard", colorboard:"colorboard",
sketchboard:"sketchboard", sketchboard:"sketchboard",
mannequins:"mannequins", mannequins:"mannequins",
masnnequinHint:"The mannequin you use is not matched with the current clothes, which will cause the generated model to not use the selected clothes",
jsContent1:'You must choose one or more colors for further process.', jsContent1:'You must choose one or more colors for further process.',
jsContent2:'You must choose one or more colors for further process.', jsContent2:'You must choose one or more colors for further process.',
jsContent3:'Failed to export the file', jsContent3:'Failed to export the file',

View File

@@ -51,6 +51,7 @@ export default {
colorboard:"tableau de couleurs", colorboard:"tableau de couleurs",
sketchboard:"planche à croquis", sketchboard:"planche à croquis",
mannequins:"mannequins", mannequins:"mannequins",
masnnequinHint:"Le mannequin que vous utilisez ne correspond pas aux vêtements actuels, ce qui empêchera le modèle généré d'utiliser les vêtements sélectionnés",
jsContent1:'Vous devez choisir une ou plusieurs couleurs pour un processus ultérieur.', jsContent1:'Vous devez choisir une ou plusieurs couleurs pour un processus ultérieur.',
jsContent2:'Vous devez choisir une ou plusieurs couleurs pour un processus ultérieur.', jsContent2:'Vous devez choisir une ou plusieurs couleurs pour un processus ultérieur.',
jsContent3:"Échec de l'exportation du fichier", jsContent3:"Échec de l'exportation du fichier",

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"tavola da disegno", colorboard:"tavola da disegno",
sketchboard:"tavola da disegno", sketchboard:"tavola da disegno",
mannequins:"manichini", mannequins:"manichini",
masnnequinHint:"Il manichino che usi non è abbinato agli abiti attuali, il che farà sì che il modello generato non utilizzi gli abiti selezionati",
jsContent1:"È necessario scegliere uno o più colori per l'ulteriore elaborazione.", jsContent1:"È necessario scegliere uno o più colori per l'ulteriore elaborazione.",
jsContent2:"È necessario scegliere uno o più colori per l'ulteriore elaborazione.", jsContent2:"È necessario scegliere uno o più colori per l'ulteriore elaborazione.",
jsContent3:'Impossibile esportare il file', jsContent3:'Impossibile esportare il file',

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"カラーボード", colorboard:"カラーボード",
sketchboard:"スケッチボード", sketchboard:"スケッチボード",
mannequins:"マネキン", mannequins:"マネキン",
masnnequinHint:"使用しているマネキンは現在の服と一致しないため、生成されたモデルは選択した服を使用しません。",
jsContent1:'以降の処理には 1 つ以上の色を選択する必要があります。', jsContent1:'以降の処理には 1 つ以上の色を選択する必要があります。',
jsContent2:'以降の処理には 1 つ以上の色を選択する必要があります。', jsContent2:'以降の処理には 1 つ以上の色を選択する必要があります。',
jsContent3:'ファイルのエクスポートに失敗しました', jsContent3:'ファイルのエクスポートに失敗しました',

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"컬러보드", colorboard:"컬러보드",
sketchboard:"스케치보드", sketchboard:"스케치보드",
mannequins:"마네킹", mannequins:"마네킹",
masnnequinHint:"사용하는 마네킹이 현재 옷과 일치하지 않아 생성된 모델이 선택한 옷을 사용하지 못하게 됩니다.",
jsContent1:'추가 처리를 위해 하나 이상의 색상을 선택해야 합니다.', jsContent1:'추가 처리를 위해 하나 이상의 색상을 선택해야 합니다.',
jsContent2:'추가 처리를 위해 하나 이상의 색상을 선택해야 합니다.', jsContent2:'추가 처리를 위해 하나 이상의 색상을 선택해야 합니다.',
jsContent3:'파일을 내보내지 못했습니다.', jsContent3:'파일을 내보내지 못했습니다.',

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"цветная доска", colorboard:"цветная доска",
sketchboard:"доска для рисования", sketchboard:"доска для рисования",
mannequins:"манекены", mannequins:"манекены",
masnnequinHint:"Используемый вами манекен не соответствует текущей одежде, из-за чего в сгенерированной модели не будет использоваться выбранная одежда.",
jsContent1:'Вы должны выбрать один или несколько цветов для дальнейшей обработки..', jsContent1:'Вы должны выбрать один или несколько цветов для дальнейшей обработки..',
jsContent2:'Вы должны выбрать один или несколько цветов для дальнейшей обработки..', jsContent2:'Вы должны выбрать один или несколько цветов для дальнейшей обработки..',
jsContent3:'Не удалось экспортировать файл', jsContent3:'Не удалось экспортировать файл',

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"กระดานสี", colorboard:"กระดานสี",
sketchboard:"กระดานสเก็ตช์", sketchboard:"กระดานสเก็ตช์",
mannequins:"หุ่น", mannequins:"หุ่น",
masnnequinHint:"หุ่นที่คุณใช้ไม่ตรงกับเสื้อผ้าปัจจุบัน ซึ่งจะทำให้แบบจำลองที่สร้างขึ้นไม่ใช้เสื้อผ้าที่เลือก",
jsContent1:'คุณต้องเลือกหนึ่งสีขึ้นไปเพื่อดำเนินการต่อไป.', jsContent1:'คุณต้องเลือกหนึ่งสีขึ้นไปเพื่อดำเนินการต่อไป.',
jsContent2:'คุณต้องเลือกหนึ่งสีขึ้นไปเพื่อดำเนินการต่อไป.', jsContent2:'คุณต้องเลือกหนึ่งสีขึ้นไปเพื่อดำเนินการต่อไป.',
jsContent3:'ล้มเหลวในการส่งออกไฟล์', jsContent3:'ล้มเหลวในการส่งออกไฟล์',

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"bảng màu", colorboard:"bảng màu",
sketchboard:"bảng phác thảo", sketchboard:"bảng phác thảo",
mannequins:"ma-nơ-canh", mannequins:"ma-nơ-canh",
masnnequinHint:"Ma-nơ-canh bạn sử dụng không khớp với quần áo hiện tại, điều này sẽ khiến mô hình được tạo không sử dụng quần áo đã chọn",
jsContent1:'Bạn phải chọn một hoặc nhiều màu để xử lý tiếp.', jsContent1:'Bạn phải chọn một hoặc nhiều màu để xử lý tiếp.',
jsContent2:'Bạn phải chọn một hoặc nhiều màu để xử lý tiếp.', jsContent2:'Bạn phải chọn một hoặc nhiều màu để xử lý tiếp.',
jsContent3:'Không xuất được tệp', jsContent3:'Không xuất được tệp',

View File

@@ -41,8 +41,13 @@
</div> </div>
</div> </div>
<div v-show="isMannequinShow" class="left_info_hint">
<span class="icon iconfont icon-zhuyi"></span>
<span>{{ $t('HomeView.masnnequinHint') }}</span>
</div>
</div> </div>
<!-- 有图状态 end--> <!-- 有图状态 end-->
</div> </div>
</div> </div>
<div class="home_page_right"> <div class="home_page_right">
@@ -223,7 +228,7 @@ import { rgbToHsv, dataURLtoBlob } from "@/tool/util";
import { openGuide,driverObj__ } from "@/tool/guide"; import { openGuide,driverObj__ } from "@/tool/guide";
import { LoadingOutlined } from "@ant-design/icons-vue"; import { LoadingOutlined } from "@ant-design/icons-vue";
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
import JSZip from "jszip"; import JSZip, { forEach } from "jszip";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie"; import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import i18n from "@/lang"; import i18n from "@/lang";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
@@ -300,6 +305,12 @@ export default defineComponent({
return store.state.Guide.guide return store.state.Guide.guide
}) })
let likeDesignItemIdList = ref([]) let likeDesignItemIdList = ref([])
let workspacePosition:any = computed(()=>{
return store.state.Workspace.workspacePosition
})
let allBoardData:any = computed(()=>{
return store.state.UploadFilesModule.allBoardData})
let isMannequinShow = ref(false)
return { return {
store, store,
likeDesignCollectionList, likeDesignCollectionList,
@@ -314,7 +325,10 @@ export default defineComponent({
userInfo, userInfo,
t, t,
driver__, driver__,
likeDesignItemIdList likeDesignItemIdList,
workspacePosition,
allBoardData,
isMannequinShow,
}; };
}, },
data() { data() {
@@ -339,6 +353,18 @@ export default defineComponent({
designRandom:'', designRandom:'',
}; };
}, },
watch: {
workspacePosition:{
handler(newVal:any,oldVal:any){
this.isMannequin()
},
},
allBoardData:{
handler(newVal:any,oldVal:any){
this.isMannequin()
},
},
},
mounted() { mounted() {
// if(JSON.parse( getCookie('isFirst') as any)){ // if(JSON.parse( getCookie('isFirst') as any)){
openGuide() openGuide()
@@ -411,10 +437,23 @@ export default defineComponent({
_teams.splice(this.dragIdx, 1) //删除被拖拽的那条数据 _teams.splice(this.dragIdx, 1) //删除被拖拽的那条数据
_teams.splice(index, 0, _dragitem) //将被拖拽的那条数据放到数组中指定的位置 _teams.splice(index, 0, _dragitem) //将被拖拽的那条数据放到数组中指定的位置
}, },
//判断模特和当前start的sketch是否匹配
isMannequin(){
this.isMannequinShow = false
let isSketchItem:any
this.allBoardData?.sketchboardFiles?.forEach((sketchItem:any) => {
isSketchItem = true
this.workspacePosition.forEach((positionItem:any) => {
if(positionItem.name == sketchItem.category){
isSketchItem = false
}
});
if(isSketchItem){
this.isMannequinShow = true
}
});
},
formatter(value: number) { formatter(value: number) {
return `${value}%`; return `${value}%`;
}, },
@@ -1187,7 +1226,8 @@ export default defineComponent({
.home_left_info { .home_left_info {
height: 100%; height: 100%;
display: flex;
flex-direction: column;
.left_info_top { .left_info_top {
padding: 0 0 1.3rem 0; padding: 0 0 1.3rem 0;
display: flex; display: flex;
@@ -1210,6 +1250,13 @@ export default defineComponent({
width: 100%; width: 100%;
} }
} }
.left_info_hint{
display: flex;
span{
font-size: 1.3rem;
display: inline-block;
}
}
} }
} }
} }

View File

@@ -565,6 +565,7 @@ export default defineComponent({
label:item.value, label:item.value,
}) })
}); });
this.sex = arr[0] this.sex = arr[0]
this.sexList = arr this.sexList = arr
this.getPosition() this.getPosition()
@@ -735,8 +736,6 @@ export default defineComponent({
// } // }
labelArr.push(item[item.length-1]?item[item.length-1]:item) labelArr.push(item[item.length-1]?item[item.length-1]:item)
}) })
console.log(this.value);
let data2 = { let data2 = {
"classificationIdList": labelArr, "classificationIdList": labelArr,
"classificationName": "", "classificationName": "",

View File

@@ -407,7 +407,6 @@ export default defineComponent({
ip:"", ip:"",
}; };
// this.loginType = 'email' // this.loginType = 'email'
this.emailStap = 2;
if(this.loginTime){ if(this.loginTime){
this.loginTime = false this.loginTime = false
Https.axiosPost(Https.httpUrls.preLogin, data).then( Https.axiosPost(Https.httpUrls.preLogin, data).then(
@@ -415,6 +414,7 @@ export default defineComponent({
// if (rv) { // if (rv) {
// this.loginType = 'email' // this.loginType = 'email'
// } // }
this.emailStap = 2;
if (rv) { if (rv) {
this.userId = rv.userId this.userId = rv.userId
this.loginType = 'email' this.loginType = 'email'
@@ -426,7 +426,6 @@ export default defineComponent({
).catch(res=>{ ).catch(res=>{
this.emailStap = 1; this.emailStap = 1;
}); });
setTimeout(() => { setTimeout(() => {
this.loginTime = true this.loginTime = true
}, 2000); }, 2000);

View File

@@ -265,7 +265,7 @@ export default defineComponent({
this.gettrialList(); this.gettrialList();
this.userInfo = JSON.parse(getCookie("userInfo") as any); this.userInfo = JSON.parse(getCookie("userInfo") as any);
if (this.userInfo.userId == 83) { if (this.userInfo.userId == 83 || this.userInfo.userId == 88) {
} else { } else {
router.replace("/home"); router.replace("/home");
return return