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>
</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="">
</div>
</div>
@@ -95,6 +95,7 @@ export default defineComponent({
let selectCode:any = ref('')
let currentPage:any = ref(1)
let searchPictureName = ref('')
let isOldSearchPictureName = ref('')
let pageSize = ref(12)
let total = ref(0)
let searcMaterialhName:any = ref('') //搜索名字
@@ -112,6 +113,7 @@ export default defineComponent({
selectCode,
currentPage,
searchPictureName,
isOldSearchPictureName,
pageSize,
total,
searcMaterialhName,
@@ -287,6 +289,7 @@ export default defineComponent({
this.isShowLoading = true
Https.axiosPost(Https.httpUrls.queryLibraryPage,data).then(
(rv: any) => {
this.total = rv.total
let aa:any = []
rv.content.forEach((item:any,index:any) => {
let arr
@@ -315,13 +318,16 @@ export default defineComponent({
}
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{
this.imgList.push(...aa)
}
// this.imgList = aa
this.total = rv.total
this.isShowLoading = false
}
).catch((res)=>{

View File

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

View File

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

View File

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

View File

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

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"colorboard",
sketchboard:"sketchboard",
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.',
jsContent2:'You must choose one or more colors for further process.',
jsContent3:'Failed to export the file',

View File

@@ -51,6 +51,7 @@ export default {
colorboard:"tableau de couleurs",
sketchboard:"planche à croquis",
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.',
jsContent2:'Vous devez choisir une ou plusieurs couleurs pour un processus ultérieur.',
jsContent3:"Échec de l'exportation du fichier",

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"tavola da disegno",
sketchboard:"tavola da disegno",
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.",
jsContent2:"È necessario scegliere uno o più colori per l'ulteriore elaborazione.",
jsContent3:'Impossibile esportare il file',

View File

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

View File

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

View File

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

View File

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

View File

@@ -50,6 +50,7 @@ export default {
colorboard:"bảng màu",
sketchboard:"bảng phác thảo",
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.',
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',

View File

@@ -41,8 +41,13 @@
</div>
</div>
<div v-show="isMannequinShow" class="left_info_hint">
<span class="icon iconfont icon-zhuyi"></span>
<span>{{ $t('HomeView.masnnequinHint') }}</span>
</div>
</div>
<!-- 有图状态 end-->
</div>
</div>
<div class="home_page_right">
@@ -223,7 +228,7 @@ import { rgbToHsv, dataURLtoBlob } from "@/tool/util";
import { openGuide,driverObj__ } from "@/tool/guide";
import { LoadingOutlined } from "@ant-design/icons-vue";
import draggable from 'vuedraggable'
import JSZip from "jszip";
import JSZip, { forEach } from "jszip";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import i18n from "@/lang";
import { useI18n } from "vue-i18n";
@@ -300,6 +305,12 @@ export default defineComponent({
return store.state.Guide.guide
})
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 {
store,
likeDesignCollectionList,
@@ -314,7 +325,10 @@ export default defineComponent({
userInfo,
t,
driver__,
likeDesignItemIdList
likeDesignItemIdList,
workspacePosition,
allBoardData,
isMannequinShow,
};
},
data() {
@@ -339,6 +353,18 @@ export default defineComponent({
designRandom:'',
};
},
watch: {
workspacePosition:{
handler(newVal:any,oldVal:any){
this.isMannequin()
},
},
allBoardData:{
handler(newVal:any,oldVal:any){
this.isMannequin()
},
},
},
mounted() {
// if(JSON.parse( getCookie('isFirst') as any)){
openGuide()
@@ -411,10 +437,23 @@ export default defineComponent({
_teams.splice(this.dragIdx, 1) //删除被拖拽的那条数据
_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) {
return `${value}%`;
},
@@ -1187,7 +1226,8 @@ export default defineComponent({
.home_left_info {
height: 100%;
display: flex;
flex-direction: column;
.left_info_top {
padding: 0 0 1.3rem 0;
display: flex;
@@ -1210,6 +1250,13 @@ export default defineComponent({
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,
})
});
this.sex = arr[0]
this.sexList = arr
this.getPosition()
@@ -735,8 +736,6 @@ export default defineComponent({
// }
labelArr.push(item[item.length-1]?item[item.length-1]:item)
})
console.log(this.value);
let data2 = {
"classificationIdList": labelArr,
"classificationName": "",

View File

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

View File

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