Merge pull request 'jie' (#26) from jie into test

Reviewed-on: #26
pull/28/head
lizijie 1 year ago
commit c3785c28d3

@ -7,11 +7,11 @@ import { ContentTypeEnum } from '@/enums/httpEnum'
*
* @returns
*/
export async function getPackageList(params: PageParam, packagename: string) {
export async function getPackageList(params: PageParam, packageName: string) {
const res = await http.request({
url: `/ocr/ocrTaskPackage/getPackageList`,
method: 'get',
params: { ...params, packagename },
params: { ...params, packageName },
})
const { data: { records, pages } } = res

@ -8,13 +8,21 @@ import { getViewportOffset } from '@/utils/domUtils'
import { hideDownload } from '@/utils/image'
import emitter from '@/utils/mitt'
import { getImgUrl } from '@/utils/urlUtils'
import {
EllipsisHorizontal, EyeOutline as EyeOutlineIcon
} from '@vicons/ionicons5'
import {
Download as DownloadIcon, Upload as UploadIcon
} from '@vicons/tabler'
import { Icon } from '@vicons/utils'
import { useInfiniteScroll } from '@vueuse/core'
import dayjs from 'dayjs'
import imagesloaded from 'imagesloaded'
import { cloneDeep, debounce } from 'lodash-es'
import Masonry from 'masonry-layout'
import { useMessage, NIcon } from 'naive-ui'
import { computed, nextTick, onMounted, onUnmounted, onUpdated, reactive, ref, unref, watch, h, } from 'vue'
import { NIcon, useMessage } from 'naive-ui'
import type { Component } from 'vue'
import { computed, h, nextTick, onMounted, onUnmounted, onUpdated, reactive, ref, unref, watch } from 'vue'
import CheckingTaskModal from './modal/CheckingTaskModal.vue'
import FinishPackageModal from './modal/FinishPackageModal.vue'
import GeneratePackageModal from './modal/GeneratePackageModal.vue'
@ -22,16 +30,6 @@ import LoginSuccessModal from './modal/LoginSuccessModal.vue'
import PackageSettingsModal from './modal/PackageSettingsModal.vue'
import QueryRepeatedTasksModal from './modal/QueryRepeatedTasksModal.vue'
import type { PictureSortParam } from "/#/api"
import type { Component } from 'vue'
import {
Upload as UploadIcon,
Download as DownloadIcon,
} from '@vicons/tabler'
import {
EyeOutline as EyeOutlineIcon,
EllipsisHorizontal,
} from '@vicons/ionicons5'
import { Icon } from '@vicons/utils'
const deviceHeight = ref(600)
let _masonry: null | Masonry = null
@ -853,4 +851,4 @@ const dropdownOptions = ref([
align-items: center;
}
}
</style>
</style>

@ -34,6 +34,9 @@ function collapseHandler() {
}
const mousetrap = inject('mousetrap') as any
mousetrap.bind('[', collapseHandler)
const searchKeyword = ref('')
const asideWidth = computed(() => {
return collapse.value ? 0 : 308;
});
@ -138,11 +141,14 @@ const showSearch = ref(false);
function setShowSearch(value: boolean) {
showSearch.value = value;
if (value === false) (packageListRef.value as any).search("");
if (value === false) {
(packageListRef.value as any).search("");
searchKeyword.value = ''
};
}
const inputHandler = debounce((word) => {
searchKeyword.value = word;
(packageListRef.value as any).search(word);
}, 500);
</script>
@ -185,6 +191,7 @@ const inputHandler = debounce((word) => {
style="flex: 1; height: 32px"
placeholder="请输入你需要搜索的内容"
@input="inputHandler"
v-model:value="searchKeyword"
>
<template #suffix>
<SvgIcon size="14px" name="magnifying-1" />

Loading…
Cancel
Save