jie #26

Merged
lizijie merged 5 commits from jie into test 1 year ago

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

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

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

Loading…
Cancel
Save