部分bug修复和对话中的图片过期处理

This commit is contained in:
X1627315083
2025-06-20 11:36:44 +08:00
parent c054dca2e8
commit 318fcc634f
21 changed files with 477 additions and 133 deletions

View File

@@ -47,7 +47,7 @@
<div class="btn">
<i class="fi fi-br-menu-dots-vertical" v-show="!childItem.editName" @click.stop="editHistory(childItem,index,$event,item[historyTypeItem])"></i>
<i class="fi fi-br-check" v-show="childItem.editName" @click.stop="accomplishHistory(childItem,index,$event)"></i>
<div class="operation" v-show="historyData.selectHistoryIndex == index">
<div class="operation" v-show="historyData.selectHistoryId == childItem.id">
<div class="item" @click.stop="editName(childItem)">
<i class="fi fi-rr-edit"></i>
<span>Rename</span>
@@ -306,7 +306,7 @@ export default defineComponent({
searchCollectionName:'',
historyTextarea:'',
updateTimeType:['Todaylist','Yesterdaylist','WithinAWeeklist','EarlierTodaylist'],
selectHistoryIndex:-1,
selectHistoryId:-1,
page:1,
size:10,
isToday:false,
@@ -581,33 +581,33 @@ export default defineComponent({
});
}
const editHistory = (item,index,el,list)=>{
if(homeMainData.historyData.selectHistoryIndex == -1){
let top = el.target.parentNode.parentNode.getBoundingClientRect().top
let parentTop = el.target.parentNode.parentNode.parentNode.offsetTop
let parentHeight = el.target.parentNode.parentNode.parentNode.offsetHeight
if(homeMainData.historyData.selectHistoryId == -1){
let top = el.target.parentNode.parentNode.getBoundingClientRect().y
let parentTop = el.target.parentNode.parentNode.parentNode.parentNode.parentNode.getBoundingClientRect().y
let parentHeight = el.target.parentNode.parentNode.parentNode.parentNode.parentNode.offsetHeight
let operation = el.target.parentNode.querySelector('.operation')
homeMainData.historyData.selectHistoryIndex = index
homeMainData.historyData.selectHistoryId = item.id
//判断弹窗是加载按钮上面还是下面
if(list.length == 1){
operation.classList.add('activeLeft')
return
}
if((parentTop+parentHeight)/2 < top){//加在按钮上面
if(top > parentHeight/2 + parentTop){//加在按钮上面
operation.classList.add('active')
}else{
operation.classList.remove('active')
}
}else{
homeMainData.historyData.selectHistoryIndex = -1
homeMainData.historyData.selectHistoryId = -1
}
let operationCli = ()=>{
homeMainData.historyData.selectHistoryIndex = -1
homeMainData.historyData.selectHistoryId = -1
document.removeEventListener("click", operationCli);
}
document.addEventListener("click",operationCli,);
}
const editName = (item)=>{
homeMainData.historyData.selectHistoryIndex = -1
homeMainData.historyData.selectHistoryId = -1
for (const key in homeMainData.openTypeList.history) {
let list = ['EarlierTodaylist','Todaylist','WithinAWeeklist','Yesterdaylist']
if(list.indexOf(key) == -1)continue
@@ -622,7 +622,7 @@ export default defineComponent({
const deleteItem = (item)=>{
Https.axiosPost(Https.httpUrls.projectDetail,{},{params:{projectId:item.id}}).then(
(rv) => {
homeMainData.historyData.selectHistoryIndex = -1
homeMainData.historyData.selectHistoryId = -1
settingGetHistory()
if(homeMainData.openTypeChild == item.id){
router.push('/home')
@@ -653,7 +653,7 @@ export default defineComponent({
}
const bathGeneration = (item)=>{
homeMainData.openType = ''
homeMainData.historyData.selectHistoryIndex = -1
homeMainData.historyData.selectHistoryId = -1
router.push(`/home/cloud?type=creation&id=${item.id}&name=${item.name}`)
}
return {

View File

@@ -423,13 +423,17 @@
(selectCode == 'Sketchboard')" class="fi fi-bs-magic-wand" style="background-color: #000; font-size: 2.3rem; flex: 1;margin: 0;"></i>
<span v-else>{{ $t('LibraryPage.Generate') }}</span>
</div>
<div class="icon iconfont icon-xiala" v-show="
selectCode == 'Moodboard' ||
(selectCode == 'Printboard' && scene?.value == 'Pattern') ||
(selectCode == 'Sketchboard')" :class="{active:speedState}" @click.stop="openSpeed"></div>
<div class="icon iconfont icon-xiala"
v-show="(selectCode == 'Sketchboard') ||
(selectCode == 'Printboard' && scene.value == 'Pattern') || selectCode == 'Moodboard'"
:class="{active:speedState}" @click.stop="openSpeed"></div>
</div>
<div class="content" v-if="scene?.value != 'extract'" v-show="speedState">
<div v-for="item in speedList" :class="{active:item.value == speedData.value}" v-show="(selectCode == 'Moodboard' && item?.value != 'flux') || (selectCode == 'Sketchboard' && item?.value != 'flux') || selectCode == 'Printboard'" :key="item.value" @click.stop="setSpeed(item)" :title="item.title">{{ item.label }}</div>
<div v-for="item in speedList" :class="{active:item.value == speedData.value}"
v-show="(selectCode == 'Moodboard' && item?.value != 'flux') ||
(selectCode == 'Sketchboard' && item?.value != 'flux') ||
(selectCode == 'Printboard')"
:key="item.value" @click.stop="setSpeed(item)" :title="item.title">{{ item.label }}</div>
</div>
<div class="content" v-else v-show="speedState">
<div v-for="item in extractList" :class="{active:item.value == speedData.value}" :key="item.value" @click.stop="setSpeed(item)" :title="item.title">{{ item.label }}</div>
@@ -716,14 +720,14 @@ export default defineComponent({
title:'Generate using Wanxiang',
label:'WX',
value:'wx',
},{
title:'',
label:'FLUX',
value:'flux',
},
],
extractList:[
{
title:'This method may produce slight discrepancies between the extracted line art and the original image.',
label:'High',
value:'',
},{
title:'Note: The extracted line art might have minor variations from the original.',
label:'FLUX',
value:'flux',
@@ -774,7 +778,7 @@ export default defineComponent({
level1Type:selectCode.value,
level2Type:design,
page:1,
ageGroup:selectCode.value == 'Sketchboard'?pageData.ageGroup:'',
ageGroup:selectCode.value == 'Models'?pageData.ageGroup:'',
modelSex:sex.value?sex.value:'',
pictureName:searchPictureName.value,
size:pageSize.value,
@@ -933,9 +937,13 @@ export default defineComponent({
}
if(newVal.value == 'extract'){
this.speedData = this.extractList[0]
}else if(newVal.value == 'Logo' || newVal.value == 'Slogan'){
this.speedData.value = ''
this.speedData.label = ''
}else{
this.speedData = this.speedList[0]
}
this.speedState = false
}
},
'$route.query':{