新增衣服设置优先级,相同衣服id导致优先级相同问题

This commit is contained in:
X1627315083
2023-12-21 17:26:49 +08:00
parent b06ea39f03
commit 70e2fe094b
16 changed files with 99 additions and 60 deletions

View File

@@ -221,6 +221,9 @@ li {
.delete_like_file_block.left { .delete_like_file_block.left {
left: 0rem; left: 0rem;
} }
.progress_mark .mark_content .ant-progress .ant-progress-text .anticon-check {
color: #7a61dc;
}
.el-popper .el-cascader-panel { .el-popper .el-cascader-panel {
--el-cascader-menu-selected-text-color: #000; --el-cascader-menu-selected-text-color: #000;
} }

View File

@@ -247,6 +247,20 @@ ul,li{
} }
} }
//design进度100
.progress_mark{
.mark_content{
.ant-progress{
.ant-progress-text{
.anticon-check{
color: #7a61dc;
}
}
}
}
}
.el-popper{ .el-popper{
.el-cascader-panel{ .el-cascader-panel{
--el-cascader-menu-selected-text-color: #000; --el-cascader-menu-selected-text-color: #000;

View File

@@ -384,24 +384,26 @@ export default defineComponent({
let num = 10 let num = 10
arr.forEach((item)=>{ arr.forEach((item)=>{
item.priority = num++ item.priority = num++
item.similarity = false//新增衣服传的是衣服id会存在两件衣服id相同所以设置为false让每次赋值都是不一样的
}) })
data.designSingleItemDTOList.forEach((item)=>{ data.designSingleItemDTOList.forEach((item)=>{
let front = arr let front = arr
let imageCategory1 = arr[1].imageCategory let imageCategory1 = arr[1].imageCategory
arr.forEach((i)=>{ for (let index = 0; index < arr.length; index++) {
let imageCategory = i.imageCategory.split('_')[0] if(item.id == arr[index].id && !arr[index].similarity){
if(item.id == i.id){ let y = ((arr[index]?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - arr[index]?.position[0])
let y = ((i?.style?.top.replace(/px/g,'')*ratio).toFixed(0) - i?.position[0]) let x = ((arr[index]?.style?.left.replace(/px/g,'')*ratio).toFixed(0) - arr[index]?.position[1])
let x = ((i?.style?.left.replace(/px/g,'')*ratio).toFixed(0) - i?.position[1]) let scale = arr[index]?.imageSize?Number(((arr[index]?.style?.width.replace(/px/g,'')*ratio)/(arr[index]?.imageSize[0]/arr[index].scale)).toFixed(2)):1
let scale = i?.imageSize?Number(((i?.style?.width.replace(/px/g,'')*ratio)/(i?.imageSize[0]/i.scale)).toFixed(2)):1
item.scale = scale item.scale = scale
let top = y == 0 ? item.offset[1]:y+item.offset[1] let top = y == 0 ? item.offset[1]:y+item.offset[1]
let left = x == 0 ? item.offset[0]:x+item.offset[0] let left = x == 0 ? item.offset[0]:x+item.offset[0]
item.offset = [left,top] item.offset = [left,top]
item.priority = i.priority item.priority = arr[index].priority
// item.offset = [(i?.style?.left.replace(/px/g,'')*ratio).toFixed(0),(i?.style?.top.replace(/px/g,'')*ratio).toFixed(0)] arr[index].similarity = true
// item.offset = [(arr[index]?.style?.left.replace(/px/g,'')*ratio).toFixed(0),(i?.style?.top.replace(/px/g,'')*ratio).toFixed(0)]
break
} }
}) }
if(item.type == this.capitalizeFirstLetter(imageCategory1)){ if(item.type == this.capitalizeFirstLetter(imageCategory1)){
item.scale = front?.imageSize?Number(((front?.style?.width.replace(/px/g,'')*ratio)/front?.imageSize[0]).toFixed(2)):1 item.scale = front?.imageSize?Number(((front?.style?.width.replace(/px/g,'')*ratio)/front?.imageSize[0]).toFixed(2)):1
} }

View File

@@ -337,19 +337,19 @@ export default defineComponent({
let isTest = getCookie('isTest') let isTest = getCookie('isTest')
// console.log(getCookie("token")); // console.log(getCookie("token"));
if(JSON.parse(isTest)){ if(JSON.parse(isTest)){
Https.axiosGet(Https.httpUrls.trialUserLogout,).then((rv) => { await Https.axiosGet(Https.httpUrls.trialUserLogout,).then((rv) => {
Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => { Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
this.$router.replace("/login"); this.$router.replace("/login");
WriteCookie("token"); WriteCookie("token");
}); });
}) })
}else{ }else{
Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => { await Https.axiosPost(Https.httpUrls.accountLogout, data).then((rv) => {
this.$router.replace("/login"); this.$router.replace("/login");
WriteCookie("token"); WriteCookie("token");
}); });
} }
window.location.reload()
}, },

View File

@@ -313,6 +313,8 @@ export default defineComponent({
color: rgba(0,0,0,.65); color: rgba(0,0,0,.65);
z-index: 2; z-index: 2;
align-items: center; align-items: center;
width: 35rem;
justify-content: space-between;
.collection_progress{ .collection_progress{
width: 8rem; width: 8rem;
height: 8rem; height: 8rem;
@@ -326,7 +328,7 @@ export default defineComponent({
} }
} }
.collection_title_text{ .collection_title_text{
margin-right: 4rem; // margin-right: 4rem;
} }
.collection_title_text_intro{ .collection_title_text_intro{
font-size: var(--aida-fsize1-4); font-size: var(--aida-fsize1-4);

View File

@@ -39,7 +39,7 @@
<div> <div>
<input v-show="openType" type="text" class="inputName" v-model="itemName" @keydown.enter="putName(-1,'affirm','')"> <input v-show="openType" type="text" class="inputName" v-model="itemName" @keydown.enter="putName(-1,'affirm','')">
<i @click.stop="putName(-1,'affirm','')" v-show="openType" class="fi fi-br-check"></i> <i @click.stop="putName(-1,'affirm','')" v-show="openType" class="fi fi-br-check"></i>
<div class="addLabel" v-show="!openType" @click="newLabel('','')">+</div> <div class="addLabel" v-show="!openType" @click.stop="newLabel('','')">+</div>
</div> </div>
<div class="started_btn" @click="removeLabel(options)">Delete</div> <div class="started_btn" @click="removeLabel(options)">Delete</div>
</li> </li>
@@ -160,6 +160,7 @@ export default defineComponent({
} }
}, },
clearOpenType(){ clearOpenType(){
this.openType = false
this.options.forEach((optionsItem:any) => { this.options.forEach((optionsItem:any) => {
optionsItem.openType = false optionsItem.openType = false
optionsItem.addOpenType = false optionsItem.addOpenType = false
@@ -169,7 +170,6 @@ export default defineComponent({
}); });
} }
}); });
this.openType = false
}, },
putName(index:number,v:string,item:any){ putName(index:number,v:string,item:any){
let e:any = window.event let e:any = window.event
@@ -186,12 +186,11 @@ export default defineComponent({
input.focus() input.focus()
}) })
}else if(v == 'affirm'){ }else if(v == 'affirm'){
if(index == -1){ if(this.itemName == ''){
if(this.itemName == ''){ message.warning(this.t('setLabel.jsContent1'));
message.warning(this.t('setLabel.jsContent1')); return
return }else{
}else{ if(index == -1){
if(item){ if(item){
item.addOpenType = false item.addOpenType = false
data = { data = {
@@ -205,15 +204,17 @@ export default defineComponent({
parentId:'' parentId:''
} }
} }
}else{
data = {
id:item.id,
classificationName:this.itemName,
}
item.classificationName = this.itemName
item.openType = false
} }
}else{
data = {
id:item.id,
classificationName:this.itemName,
}
item.classificationName = this.itemName
item.openType = false
} }
this.addLabel(data) this.addLabel(data)
document.removeEventListener('click',this.clearOpenType) document.removeEventListener('click',this.clearOpenType)
} }
@@ -372,7 +373,8 @@ export default defineComponent({
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
padding: .5rem 1rem; padding: .5rem 1rem;
width: 16rem; // width: 16rem;
width: auto;
margin: 2rem 1rem; margin: 2rem 1rem;
border-radius: 1rem; border-radius: 1rem;
justify-content: space-between; justify-content: space-between;
@@ -384,11 +386,19 @@ export default defineComponent({
display: flex; display: flex;
} }
>span{ >span{
max-width: 60%; // max-width: 60%;
margin: 0 2rem;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
}
div.setLabel_text{
>input{
margin: 0 2rem;
width: 14rem;
}
} }
} }
@@ -434,6 +444,7 @@ export default defineComponent({
background: #f0f0f0; background: #f0f0f0;
// background: #d5d5d5; // background: #d5d5d5;
font-size: 1.4rem; font-size: 1.4rem;
width: 16rem;
label{ label{
transform: scale(.8); transform: scale(.8);
@@ -490,6 +501,7 @@ export default defineComponent({
.newLabel{ .newLabel{
text-align: center; text-align: center;
justify-content: center; justify-content: center;
width: 16rem;
&.optionsItem_title{ &.optionsItem_title{
width: 100%; width: 100%;
margin: 0; margin: 0;

View File

@@ -80,7 +80,7 @@ export default {
Name:'名字:', Name:'名字:',
inputContent3:'输入生成图片的标题', inputContent3:'输入生成图片的标题',
Cancel:'取消', Cancel:'取消',
Sure:'确定', Sure:'保存',
Moodboard:'情绪板', Moodboard:'情绪板',
Prints:'印花', Prints:'印花',
Sketches:'服装', Sketches:'服装',

View File

@@ -80,7 +80,7 @@ export default {
Name:'Name:', Name:'Name:',
inputContent3:'Enter a new name', inputContent3:'Enter a new name',
Cancel:'Cancel', Cancel:'Cancel',
Sure:'Sure', Sure:'Submit',
Moodboard:'Moodboard', Moodboard:'Moodboard',
Prints:'Prints', Prints:'Prints',
Sketches:'Sketches', Sketches:'Sketches',

View File

@@ -81,7 +81,7 @@ export default {
Name:'Nom:', Name:'Nom:',
inputContent3:'Saisie rapide', inputContent3:'Saisie rapide',
Cancel:'Annuler', Cancel:'Annuler',
Sure:'Bien sûr', Sure:'Soumettre',
Moodboard:"Conseil d'humeur", Moodboard:"Conseil d'humeur",
Prints:'Impressions', Prints:'Impressions',
Sketches:'Croquis', Sketches:'Croquis',

View File

@@ -80,7 +80,7 @@ export default {
Name:'Nome:', Name:'Nome:',
inputContent3:'Immissione rapida', inputContent3:'Immissione rapida',
Cancel:'Annulla', Cancel:'Annulla',
Sure:'Sicuro', Sure:'Invia',
Moodboard:"Tavola d'atmosfera", Moodboard:"Tavola d'atmosfera",
Prints:'Stampe', Prints:'Stampe',
Sketches:'Schizzi', Sketches:'Schizzi',

View File

@@ -80,7 +80,7 @@ export default {
Name:'名前:', Name:'名前:',
inputContent3:'プロンプト入力', inputContent3:'プロンプト入力',
Cancel:'キャンセル', Cancel:'キャンセル',
Sure:'もちろん', Sure:'提出す',
Moodboard:'ムードボード', Moodboard:'ムードボード',
Prints:'プリント', Prints:'プリント',
Sketches:'スケッチ', Sketches:'スケッチ',

View File

@@ -80,7 +80,7 @@ export default {
Name:'이름:', Name:'이름:',
inputContent3:'프롬프트 입력', inputContent3:'프롬프트 입력',
Cancel:'취소', Cancel:'취소',
Sure:'확신하는', Sure:'제출하다',
Moodboard:'무드보드', Moodboard:'무드보드',
Prints:'인쇄물', Prints:'인쇄물',
Sketches:'스케치', Sketches:'스케치',

View File

@@ -80,7 +80,7 @@ export default {
Name:'Имя:', Name:'Имя:',
inputContent3:'Быстрый ввод', inputContent3:'Быстрый ввод',
Cancel:'Отмена', Cancel:'Отмена',
Sure:'Конечно', Sure:'Запись',
Moodboard:'Мудборд', Moodboard:'Мудборд',
Prints:'Принты', Prints:'Принты',
Sketches:'Эскизы', Sketches:'Эскизы',

View File

@@ -80,7 +80,7 @@ export default {
Name:'ชื่อ:', Name:'ชื่อ:',
inputContent3:'ป้อนข้อมูลทันที', inputContent3:'ป้อนข้อมูลทันที',
Cancel:'ยกเลิก', Cancel:'ยกเลิก',
Sure:'ได้เลย', Sure:'บันทึก',
Moodboard:'มูดบอร์ด', Moodboard:'มูดบอร์ด',
Prints:'พิมพ์', Prints:'พิมพ์',
Sketches:'สเก็ตช์', Sketches:'สเก็ตช์',

View File

@@ -80,7 +80,7 @@ export default {
Name:'Tên:', Name:'Tên:',
inputContent3:'Nhập liệu nhanh chóng', inputContent3:'Nhập liệu nhanh chóng',
Cancel:'Hủy bỏ', Cancel:'Hủy bỏ',
Sure:'Chắc chắn', Sure:'Nộp',
Moodboard:'Bảng tâm trạng', Moodboard:'Bảng tâm trạng',
Prints:'Bản in', Prints:'Bản in',
Sketches:'Bản phác thảo', Sketches:'Bản phác thảo',

View File

@@ -723,7 +723,7 @@ export default defineComponent({
}, },
//确定修改名称 //确定修改名称
confrimRename(){ async confrimRename(){
let data = { let data = {
libraryIds:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList, libraryIds:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
libraryName:this.newPicName, libraryName:this.newPicName,
@@ -748,27 +748,32 @@ export default defineComponent({
"updateTime": "", "updateTime": "",
"userId": 0 "userId": 0
} }
Https.axiosPost(Https.httpUrls.batchUpdateLibraryName, data).then( let bor = false
(rv: any) => { if(this.newPicName){//多选修改名字
if(this.renameType ==='batch'){ await Https.axiosPost(Https.httpUrls.batchUpdateLibraryName, data).then(
this.selectImgList = [] (rv: any) => {
} if(this.renameType ==='batch'){
Https.axiosPost(Https.httpUrls.relationLibrary, data2).then( this.selectImgList = []
(rv: any) => {
this.getLibraryList()
this.closeRenameModal()
} }
).catch((res)=>{ bor = true
// this.closeRenameModal() }
}); ).catch((res)=>{
} // this.closeRenameModal()
).catch((res)=>{ });
// this.closeRenameModal() }
}); if(labelArr.length > 0){//多选修改标签
await Https.axiosPost(Https.httpUrls.relationLibrary, data2).then(
(rv: any) => {
bor = true
}
).catch((res)=>{
// this.closeRenameModal()
});
}
if(bor){
this.getLibraryList()
}
this.closeRenameModal()
}, },
//打开修改名称弹窗 //打开修改名称弹窗
@@ -792,6 +797,7 @@ export default defineComponent({
"updateTime": "", "updateTime": "",
"userId": 0 "userId": 0
} }
this.value.editLabelValue = []
if(type === 'single'){ if(type === 'single'){
this.selectSingleImg = data this.selectSingleImg = data
this.newPicName = data.name this.newPicName = data.name