diff --git a/src/api/home/filter.ts b/src/api/home/filter.ts index b9c0371..353a0b1 100644 --- a/src/api/home/filter.ts +++ b/src/api/home/filter.ts @@ -57,7 +57,7 @@ export async function updateCondition(params: FilterUpdate) { export async function deleteCondition(params: { ids: string }) { return http.request({ url: `/ocr/ocrUsersearch/deleteBatch`, - method: 'delete', + method: 'get', params, }) } diff --git a/src/config/aside.ts b/src/config/aside.ts index 257039f..1a1b6fd 100644 --- a/src/config/aside.ts +++ b/src/config/aside.ts @@ -69,6 +69,7 @@ export const asideMap: Recordable = { isDefaultFilter: false, key: 'izupload', component: PictureUploadVue, + inFilterList: false, }, izcustomtype: { label: '客户类型', diff --git a/src/views/home/aside/comp/modals/FilterModal.vue b/src/views/home/aside/comp/modals/FilterModal.vue index 7be82d9..21c88e6 100644 --- a/src/views/home/aside/comp/modals/FilterModal.vue +++ b/src/views/home/aside/comp/modals/FilterModal.vue @@ -81,7 +81,7 @@ const loading = ref(true) const pagination = reactive({ page: 1, pageCount: 1, - pageSize: 2, + pageSize: 10, }) const tableData = ref>([]) const keyword = ref('') @@ -99,7 +99,7 @@ async function query(page: number, pageSize: number) { function afterLeave() { pagination.page = 1 pagination.pageCount = 1 - pagination.pageSize = 5 + pagination.pageSize = 10 } const selectionIds = ref([]) @@ -239,7 +239,7 @@ defineExpose({ const inputHandler = debounce((word) => { keyword.value = word - query(1, 10) + query(1, 5) }, 300) diff --git a/src/views/home/aside/comp/modals/NewFilterModal.vue b/src/views/home/aside/comp/modals/NewFilterModal.vue index 46940ff..bfc78cc 100644 --- a/src/views/home/aside/comp/modals/NewFilterModal.vue +++ b/src/views/home/aside/comp/modals/NewFilterModal.vue @@ -6,6 +6,7 @@ import { useDictionary } from '@/store/modules/dictonary' import { useConfig } from '@/store/modules/asideConfig' import type { FilterCondition } from '/#/api' import { addCondition, updateCondition } from '@/api/home/filter' +import { formatToDate2 } from '@/utils/dateUtil' defineOptions({ name: 'NewFilterModal' }) @@ -95,6 +96,7 @@ const formValue = reactive({ function handleSumbit(e: MouseEvent) { e.preventDefault() + const v = formRef.value formRef.value?.validate((errors) => { if (errors) return @@ -105,7 +107,7 @@ function handleSumbit(e: MouseEvent) { return { searchfield: type!, searchtype: operator!, - searchvalue: result!, + searchvalue: formatValue(type!, result), searchRelationType: formValue.logic!, orderNum: index + 1, } @@ -113,6 +115,7 @@ function handleSumbit(e: MouseEvent) { const param: FilterCondition = { searchname: formValue.name!, + type: 0, ocrUsersearchchildList: list, } @@ -124,6 +127,19 @@ function handleSumbit(e: MouseEvent) { }) } +function formatValue(searchfield: string, searchvalue: any) { + if (searchfield === 'izyear') { + const start = formatToDate2(searchvalue[0]) + const end = formatToDate2(searchvalue[1]) + return `${start}-${end}` + } + + if (Array.isArray(searchvalue)) + return searchvalue.join(',') + + return searchvalue +} + function createCondition() { formValue.conditions.push({ type: null, @@ -293,8 +309,7 @@ defineExpose({ />