From 390a9e0a219c9c43c61f7b7cff4cfd33d1073fe5 Mon Sep 17 00:00:00 2001 From: raofuzi <2641346316@qq.com> Date: Mon, 8 Apr 2024 18:13:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Header/RecycleModal.vue | 49 ++++++++++++++++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/src/layout/components/Header/RecycleModal.vue b/src/layout/components/Header/RecycleModal.vue index 64f0e2e..e090478 100644 --- a/src/layout/components/Header/RecycleModal.vue +++ b/src/layout/components/Header/RecycleModal.vue @@ -155,7 +155,6 @@ onUpdated(() => { }) onBeforeMount(async () => { - console.log(888) // const list = await featchList() // listData.value = list }) @@ -191,7 +190,28 @@ function imUpdateSelectIds(x: number, y: number, w: number, h: number) { if (rect.right > x && rect.bottom > y && rect.left < x + w && rect.top < y + h) index === -1 && selectIds.value.push(item.dataset.id!) else index !== -1 && selectIds.value.splice(index, 1) + + let tempApproveIndex = -1; + selectedApproveItems.value.map((approveItem, approveIndex) => { + if(approveItem.dataset.id == item.dataset.id) { + tempApproveIndex = approveIndex; + } + }) + if (tempApproveIndex === -1 && item.className.indexOf('grid-item-selected') != -1) { + selectedApproveItems.value.push(item) + } else { + selectedApproveItems.value.splice(tempApproveIndex, 1); + } }) + // 选中复选框 + listData.value.map(item => { + if(selectIds.value.includes(String(item.pictureId))) { + item.checked = true; + } + }); + + + } function isSelected(pictureId: number) { @@ -217,8 +237,16 @@ function moveHandler(e: MouseEvent) { function upHandler(event: MouseEvent) { if (!selectionBox) - return - + return + if(selectionBox.style.width == "0px") { + selectIds.value = [] + selectedApproveItems.value.forEach((item) => (item.checked = false)); + selectedApproveItems.value.length = 0; + listData.value.map(item => { + item.checked = false; + }); + batch.value = false; + } selectionBox.style.display = 'none' start = null } @@ -274,7 +302,6 @@ async function showModal() { } async function onChange(val) { - console.log("val------------------------", val); sortObj = { // orderbyname: val, orderByUptime: val @@ -285,7 +312,6 @@ async function onChange(val) { } async function onChangeView(val) { - console.log("val------------------------", val); sortObj = { // orderbyname: val, orderBySimilarity: val @@ -345,9 +371,18 @@ const showActions = computed(() => { function onCheckChange(checked: any, item: any) { item.checked = checked const index = selectedApproveItems.value.indexOf(item); + const picIndex = selectIds.value.indexOf(item.pictureId); - if (index === -1 && checked) selectedApproveItems.value.push(item); - else selectedApproveItems.value.splice(index, 1); + if (index === -1 && checked) { + selectedApproveItems.value.push(item) + } else { + selectedApproveItems.value.splice(index, 1); + } + if (picIndex === -1 && checked) { + selectIds.value.push(item.pictureId); + } else { + selectIds.value.splice(picIndex, 1); + } } function rejectHandler() { From e2e5e6dec36973ee9c662d2b7f3622267b17dc30 Mon Sep 17 00:00:00 2001 From: raofuzi <2641346316@qq.com> Date: Mon, 8 Apr 2024 20:41:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Header/RecycleModal.vue | 14 +++++++++++--- src/views/home/content/Content.vue | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/layout/components/Header/RecycleModal.vue b/src/layout/components/Header/RecycleModal.vue index e090478..2e7b32d 100644 --- a/src/layout/components/Header/RecycleModal.vue +++ b/src/layout/components/Header/RecycleModal.vue @@ -579,7 +579,7 @@ async function refreshHandler(filtersearchId?: any) {
{{ item.similarityScore }}%
-
+
+
+ + {{ item?.photoDateTimestamp ? + formatToDateHMS(Number(item.photoDateTimestamp)) : '-' }} +
{{ item.submitDateTimestamp ? @@ -769,9 +774,12 @@ async function refreshHandler(filtersearchId?: any) { } .time { position: absolute; + width: 182px; + padding-left: 10px; z-index: 3; - left: 32px; - bottom: 32px; + left: 16px; + bottom: 16px; + background: linear-gradient(180deg,rgba(6,0,0,0.01),rgba(0, 0, 0, 0.44) 100%); .time-item { display: flex; diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index 5e5de99..4b840f0 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -525,7 +525,8 @@ function previewHandler(index: number, event: MouseEvent) { event.stopImmediatePropagation(); event.stopPropagation(); if (imageRef.value?.[index] && (imageRef.value[index] as any).src) - (imageRef.value?.[index] as any).mergedOnClick(); + // (imageRef.value?.[index] as any).mergedOnClick(); + (imageRef.value?.[index] as any).click(); } const timer = ref(); From 114d5e95270e022b0bb83979b808f874969572f1 Mon Sep 17 00:00:00 2001 From: raofuzi <2641346316@qq.com> Date: Tue, 9 Apr 2024 09:57:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=86=B2?= =?UTF-8?q?=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Header/RecycleModal.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/layout/components/Header/RecycleModal.vue b/src/layout/components/Header/RecycleModal.vue index 2e7b32d..2e43fcb 100644 --- a/src/layout/components/Header/RecycleModal.vue +++ b/src/layout/components/Header/RecycleModal.vue @@ -132,7 +132,6 @@ async function featchList() { // imgUrl: randomUrl(), // } // }) - // console.log(list) // return list } catch (error) {