feat: 历史页面搜索功能

This commit is contained in:
zhangyh
2025-09-18 10:58:06 +08:00
parent a151b712ca
commit 4783ccaa76

View File

@@ -27,10 +27,24 @@
> >
<template #bodyCell="{ column, text, record, index }"> <template #bodyCell="{ column, text, record, index }">
<div class="operate_list" v-if="column?.Operations"> <div class="operate_list" v-if="column?.Operations">
<div class="operate_item" @click="turnToDetail(record)"> <div
class="operate_item"
v-if="
record.process !== 'TO_PRODUCT_IMAGE' &&
record.process !== 'POSE_TRANSFER'
"
@click="turnToDetail(record)"
>
{{ $t('HistoryPage.Detail') }} {{ $t('HistoryPage.Detail') }}
</div> </div>
<div class="operate_item" @click="renameCollection(record, index)"> <div
class="operate_item"
v-if="
record.process !== 'TO_PRODUCT_IMAGE' &&
record.process !== 'POSE_TRANSFER'
"
@click="renameCollection(record, index)"
>
{{ $t('LibraryPage.Rename') }} {{ $t('LibraryPage.Rename') }}
</div> </div>
<div class="operate_item" @click="retrieveHome(record)"> <div class="operate_item" @click="retrieveHome(record)">
@@ -214,11 +228,11 @@ export default defineComponent({
pageSize: 10, pageSize: 10,
total: 0, total: 0,
presetList: [ presetList: [
{ label: this.t('Header.All'), value: 'all' }, { label: this.t('Header.All'), value: '' },
{ label: this.t('newProjectg.series'), value: 'series' }, { label: this.t('newProjectg.series'), value: 'SERIES_DESIGN' },
{ label: this.t('newProjectg.single'), value: 'single' }, { label: this.t('newProjectg.single'), value: 'SINGLE_DESIGN' },
{ label: this.t('Header.Product'), value: 'product' }, { label: this.t('Header.Product'), value: 'TO_PRODUCT_IMAGE' },
{ label: this.t('Header.POSE_TRANSFER'), value: 'video' } { label: this.t('Header.POSE_TRANSFER'), value: 'POSE_TRANSFER' }
], ],
searchParam: { searchParam: {
text: '', text: '',
@@ -299,10 +313,13 @@ export default defineComponent({
searchHistoryList(value: any) { searchHistoryList(value: any) {
console.log('value', value) console.log('value', value)
this.currentPage = 1 this.currentPage = 1
this.getHistoryList() this.getHistoryList({
process: value.currentPreset,
projectName: value.searchText
})
}, },
async getHistoryList() { async getHistoryList(param:object) {
this.isShowMark = true this.isShowMark = true
let startDate: any = this.rangePickerValue let startDate: any = this.rangePickerValue
? new Date(this.rangePickerValue[0]).getTime() ? new Date(this.rangePickerValue[0]).getTime()
@@ -322,7 +339,8 @@ export default defineComponent({
collectionName: this.searchCollectionName, collectionName: this.searchCollectionName,
startDate: startDate, startDate: startDate,
endDate: endDate, endDate: endDate,
intersection: this.intersection intersection: this.intersection,
...param
} }
await Https.axiosPost(Https.httpUrls.historyProject, data) await Https.axiosPost(Https.httpUrls.historyProject, data)