Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite

This commit is contained in:
李志鹏
2025-09-26 15:13:04 +08:00
5 changed files with 40 additions and 17 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

View File

@@ -56,9 +56,14 @@
<span class="image-name">{{ item.name || "未命名" }}</span> <span class="image-name">{{ item.name || "未命名" }}</span>
</div> </div>
</div> </div>
<div class="image-select" v-show="selectList.includes(item.url)"> <!-- <div class="image-select" v-show="selectList.includes(item.url)">
<i class="fi fi-sr-check-circle"></i> <i class="fi fi-sr-check-circle"></i>
</div> </div> -->
<img
src="@/assets/images/icon/selected.png"
class="image-select"
v-show="selectList.includes(item.url)"
>
</div> </div>
</div> </div>

View File

@@ -38,9 +38,10 @@
<span class="image-name">{{ item.name || '未命名' }}</span> <span class="image-name">{{ item.name || '未命名' }}</span>
</div> </div>
</div> </div>
<div class="image-select" v-show="selectList.includes(item.url)"> <img class="selected-icon image-select" src="@/assets/images/icon/selected.png" v-show="selectList.includes(item.url)">
<!-- <div class="" v-show="selectList.includes(item.url)">
<i class="fi fi-sr-check-circle"></i> <i class="fi fi-sr-check-circle"></i>
</div> </div> -->
</div> </div>
</div> </div>
@@ -242,8 +243,8 @@ const resetAndLoad = (category = selectedCategory.value) => {
list.value = [] list.value = []
hasMore.value = true hasMore.value = true
currentPage.value = 0 currentPage.value = 0
console.log('默认选择----',getDefaultCategory()) // console.log('默认选择----',getDefaultCategory())
selectedCategory.value = getDefaultCategory() selectedCategory.value =category || getDefaultCategory()
fetchImages(1, category, true) fetchImages(1, category, true)
// 检查是否需要自动加载更多数据 // 检查是否需要自动加载更多数据
@@ -280,6 +281,7 @@ const handleImageClick = item => {
// 处理分类切换 // 处理分类切换
const handleChangeCategory = category => { const handleChangeCategory = category => {
// console.log('handleChangeCategory',category)
selectedCategory.value = category selectedCategory.value = category
// 如果提供了API则重新加载数据 // 如果提供了API则重新加载数据
@@ -508,8 +510,9 @@ defineExpose({
overflow-y: auto; overflow-y: auto;
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
gap: 16px; gap: 16px;
min-height: 20rem; min-height: 22rem;
max-height: 50rem; max-height: 50rem;
padding-bottom: 2rem;
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
@@ -574,12 +577,16 @@ defineExpose({
.image-select { .image-select {
position: absolute; position: absolute;
bottom: 0; bottom: -1.25rem;
right: 0; right: -1.25rem;
z-index: 2; z-index: 2;
transform: translate(50%, 50%); // transform: translate(50%, 50%);
i { // i {
font-size: 2.5rem; // font-size: 2.5rem;
// }
&.selected-icon{
width:2.5rem;
height: 2.5rem;
} }
} }

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="table_search_bar flex flex-justify-between flex-align-center"> <div class="table_search_bar flex flex-align-center flex-justify-between">
<div class="search_preset flex flex-1"> <div class="search_preset flex ">
<div <div
class="preset_item gallery_btn white" class="preset_item gallery_btn white"
v-for="item in buttonList" v-for="item in buttonList"
@@ -11,15 +11,15 @@
{{ item.label }} {{ item.label }}
</div> </div>
</div> </div>
<div class="search_input flex flex-align-center"> <div class="search_input flex flex-align-center" :style="{ width: inputWidth }">
<input <input
class="search_input_inner flex-1" class="search_input_inner"
v-model="searchParams.searchText" v-model="searchParams.searchText"
:bordered="false" :bordered="false"
@keydown.enter="handleSearch" @keydown.enter="handleSearch"
:placeholder="placeholder" :placeholder="placeholder"
/> />
<SearchOutlined @click="handleSearch" /> <SearchOutlined class="search_input_icon" @click="handleSearch" />
</div> </div>
</div> </div>
</template> </template>
@@ -36,6 +36,7 @@ interface ButtonItem {
interface Props { interface Props {
buttonList: ButtonItem[] buttonList: ButtonItem[]
placeholder?: string placeholder?: string
inputWidth?: string
} }
interface SearchParams { interface SearchParams {
@@ -91,11 +92,13 @@ const handleSearch = () => {
line-height: 4rem; line-height: 4rem;
min-width: 10rem; min-width: 10rem;
font-weight: normal; font-weight: normal;
border-width: 0.1rem;
} }
} }
.search_input { .search_input {
height: 4rem; height: 4rem;
width: 23rem; // 默认宽度
background-color: #fff; background-color: #fff;
border: 0.1rem solid #000; border: 0.1rem solid #000;
border-radius: 43rem; border-radius: 43rem;
@@ -106,6 +109,10 @@ const handleSearch = () => {
height: 100%; height: 100%;
padding-left: 3rem; padding-left: 3rem;
border-radius: 4rem; border-radius: 4rem;
width: calc(100% - 2rem);
}
.search_input_icon {
font-size: 2rem;
} }
} }
} }

View File

@@ -403,6 +403,10 @@ export default defineComponent({
homeMainData.openType = Object.keys(query)[0] homeMainData.openType = Object.keys(query)[0]
homeMainData.openTypeChild = query[Object.keys(query)[0]] homeMainData.openTypeChild = query[Object.keys(query)[0]]
} }
if(homeMainData.openType === 'history' && route.path !== '/home/history'){
homeMainData.openTypeChild = ''
homeMainData.openType = ''
}
if((query?.id || query?.history) && !await getIdExistToHistory()){ if((query?.id || query?.history) && !await getIdExistToHistory()){
router.push('/home') router.push('/home')
return return