From ceb473d4b2cc08bdb12fa4d8b2de1b22c13ff966 Mon Sep 17 00:00:00 2001 From: elseif Date: Mon, 18 Mar 2024 17:38:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B7=A5=E5=8D=95=E6=8B=96=E5=8A=A8?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=EF=BC=9B=E6=9B=B4=E6=8D=A2=E7=BC=A9=E7=95=A5?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/work/work.ts | 2 + src/views/home/content/Content.vue | 40 ++- src/views/task/content/Content.vue | 2 +- src/views/worksheet/aside/WorkSheetList.vue | 2 +- src/views/worksheet/content/Content.vue | 306 +++++++++++++------- 5 files changed, 226 insertions(+), 126 deletions(-) diff --git a/src/api/work/work.ts b/src/api/work/work.ts index 949fc80..c84322f 100644 --- a/src/api/work/work.ts +++ b/src/api/work/work.ts @@ -77,6 +77,7 @@ export async function getTaskDetailPictureList(packageid: string, taskchildpictu }) const { data: { records, pages, total } } = res + debugger // 精简一下数据 const list = records.map((item) => { @@ -87,6 +88,7 @@ export async function getTaskDetailPictureList(packageid: string, taskchildpictu assignee: item.assignee, pictureid: item.pictureid, imgurl: item.ocrPicture.imgurl, + thumburl: item.serverThumbnailUrl || item.ocrPicture.imgurl, iztrueorfalse: item.iztrueorfalse, states: item.states, history: hasHistory(item.ocpictureid, item.picturecompare), diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index ada822f..35148cf 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -26,7 +26,7 @@ const el = ref(null) const viewMode = ref('masonry') const pagination = reactive({ pageNo: 0, - pageSize: 50, + pageSize: 30, }) const configStore = useConfig() const packageModalRef = ref(null) @@ -136,6 +136,7 @@ async function featchList() { const list = data.map((item) => { return { imgUrl: item.imgurl, + thumburl: item.serverThumbnailUrl || item.imgurl, upname: item.upname, ocrPictureclass: item.ocrPictureclass, uphead: item.uphead, @@ -216,7 +217,7 @@ watch(() => configStore.asideValue, (newVal, oldVal) => { function reset() { pagination.pageNo = 0 - pagination.pageSize = 50 + pagination.pageSize = 30 listData.value.length = 0 loading.value = false canloadMore = true @@ -241,6 +242,10 @@ async function refreshHandler(filtersearchId?: any) { function getAvatar(url: string): string { return url ? getImgUrl(url) : avatar } + +const totalCount = computed(() => { + return listData.value.length +})