From d66823e4e3e16972b7a7ee75afd298d27fb8a1a1 Mon Sep 17 00:00:00 2001 From: lihui_ocr Date: Thu, 30 May 2024 10:51:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=AB=98=E6=99=92=E5=8F=8A=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/aside/Aside.vue | 20 +++++++++++++++++-- .../home/aside/comp/modals/NewFilterModal.vue | 19 +++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/views/home/aside/Aside.vue b/src/views/home/aside/Aside.vue index aae288a..3169001 100644 --- a/src/views/home/aside/Aside.vue +++ b/src/views/home/aside/Aside.vue @@ -249,10 +249,26 @@ function scrollHandler(key: string) { // 选择某个过滤配置,刷新图片墙 -> 筛选搜索条件 async function filterHandler(searchId: string) { + // emitter.emit('filter', searchId) const res = await getFilterList({ userSearchId: searchId }) - // console.log("顾虑结果", res); + console.log("顾虑结果", res); if (res.code == 'OK') { + console.log( res.data.izsimilarity==null) + if(res.data.izsimilarity==null){ + res.data.izsimilarity=[0,100] + } + if(res.data.izyear==null){ + let arr=[0,0] + arr[1]=new Date().getTime() + let currentDate = new Date(); +// 前推30天 +let pastDate = new Date(); +pastDate.setDate(currentDate.getDate() - 30); + arr[0]=pastDate.getTime(); + res.data.izyear=arr + } + const obj = res.data customObjRef.value = res.data const showKeys: any[] = [] @@ -377,7 +393,7 @@ useKeydown('s', () => setShowSearch(true)) @handle-ok="handleOk" /> - + diff --git a/src/views/home/aside/comp/modals/NewFilterModal.vue b/src/views/home/aside/comp/modals/NewFilterModal.vue index aadec67..ddab4c3 100644 --- a/src/views/home/aside/comp/modals/NewFilterModal.vue +++ b/src/views/home/aside/comp/modals/NewFilterModal.vue @@ -11,7 +11,7 @@ import SvgIcon from '@/components/Icon/SvgIcon.vue' type Status = 'edit' | 'new' -const emit = defineEmits(['onOk','handleOk']) +const emit = defineEmits(['onOk','handleOk','select']) const show = ref(false) const editValue=ref({}) const configStore = useConfig() @@ -126,7 +126,17 @@ function handleSumbit(e: MouseEvent) { addCondition(param) else updateCondition({ id: currentEditId!, ...param }) console.log(editValue.value) - emit('handleOk', editValue.value) + let obj=editValue.value + if(currentStatus.value != 'new'){ + obj.searchname=param.searchname + // obj.ocrUsersearchchildList=param.ocrUsersearchchildList + } + emit('handleOk', obj) + + if(currentStatus.value != 'new'){ + emit('select', currentEditId) + } + closeModal() }) } @@ -153,6 +163,8 @@ function unformatValue(searchfield: string, searchvalue: any) { const start = formatToDate3(dataStrs[0]) const end = formatToDate3(dataStrs[1]) return [start, end] + }else if(searchfield !="izsimilarity"){ +searchvalue= searchvalue.split(","); } // 80,90 @@ -414,6 +426,7 @@ if(formValue.name){ clearable /> + + />