From dacacfb8f3f6f3b7ee01bfab5d7da8ab1ce29ae4 Mon Sep 17 00:00:00 2001 From: lihui_ocr Date: Mon, 29 Apr 2024 17:23:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E6=A3=80=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/final/content/Content.vue | 2 +- src/views/final/content/ListContent.vue | 2 +- src/views/task/content/Content.vue | 23 +++++++++++++++++------ src/views/task/modal/ImgDetailModal.vue | 12 ------------ src/views/task/modal/MapModal.vue | 5 ----- src/views/worksheet/content/Content.vue | 3 ++- 6 files changed, 21 insertions(+), 26 deletions(-) diff --git a/src/views/final/content/Content.vue b/src/views/final/content/Content.vue index 2708ced..cce6639 100644 --- a/src/views/final/content/Content.vue +++ b/src/views/final/content/Content.vue @@ -1080,7 +1080,7 @@ defineExpose({ background: url(/src/assets/images/pocitypass.png) no-repeat; background-size: 100% 100%; border-radius: 17px; - box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3); + // box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3); display: flex; align-items: center; justify-content: center; diff --git a/src/views/final/content/ListContent.vue b/src/views/final/content/ListContent.vue index 004d1dc..b322a0d 100644 --- a/src/views/final/content/ListContent.vue +++ b/src/views/final/content/ListContent.vue @@ -826,7 +826,7 @@ defineExpose({ background: url(/src/assets/images/pocitypass.png) no-repeat; background-size: 100% 100%; border-radius: 17px; - box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3); + // box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3); display: flex; align-items: center; justify-content: center; diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index 8013e12..8323ed7 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -72,6 +72,7 @@ const pagination = reactive({ pageNo: 0, pageSize: 30, }) + function onCheckChange(checked: any, item: any) { const index = selectItems.value.indexOf(item) item.checked = checked @@ -122,7 +123,10 @@ onMounted(() => { taskIndex.value = route.query.taskindex as string isDetail.value = true getDetail() + } + + window.addEventListener('keydown', onEsc) }) function changeimgbigshow() { @@ -131,12 +135,7 @@ function changeimgbigshow() { // 键盘左右箭头快捷切换 useKeydown('right', forwardHandler) useKeydown('left', backHandler) -useKeydown('c', () => { - isFullScreen.value = false - imgbigshow.value = false - const modal = unref(imgdetailref)! as any - modal.closeModal() -}) + useKeydown('p p', () => { const item = taskDetailInfo.value if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) { @@ -439,10 +438,22 @@ function showActionsModal() { const modal = unref(CustomSettingModalRef)! as any modal.showModal() } +function onEsc(event: KeyboardEvent) { + if (event.code === 'KeyC') { + const modal = unref(MapModalRef)! as any + const modal2 = unref(imgdetailref)! as any + modal?.closeModal() + modal2?.closeModal() + imgbigshow.value = true + isFullScreen.value = false + } +} onUnmounted(() => { taskStore.reset() + window.removeEventListener('keydown', onEsc) window.removeEventListener('scroll', checkBottom) + }) function immersionHandler() { diff --git a/src/views/task/modal/ImgDetailModal.vue b/src/views/task/modal/ImgDetailModal.vue index 406f380..19eab98 100644 --- a/src/views/task/modal/ImgDetailModal.vue +++ b/src/views/task/modal/ImgDetailModal.vue @@ -105,18 +105,6 @@ function nopassfun(e= taskDetailInfo.value){ emit('nopassfun', e); // closeModal() } -useKeydown('c', () => { - - closeModal() -}) -useKeydown('p p', () => { -passfun() - -}) -useKeydown('x x', () => { - nopassfun() - -}) onMounted(async () => { diff --git a/src/views/task/modal/MapModal.vue b/src/views/task/modal/MapModal.vue index 40212dc..7bec8e8 100644 --- a/src/views/task/modal/MapModal.vue +++ b/src/views/task/modal/MapModal.vue @@ -37,11 +37,6 @@ function closeModal(){ show.value=false } -useKeydown('c', () => { - - closeModal() -}) - onMounted(async () => { diff --git a/src/views/worksheet/content/Content.vue b/src/views/worksheet/content/Content.vue index 80a9bb0..9b4706e 100644 --- a/src/views/worksheet/content/Content.vue +++ b/src/views/worksheet/content/Content.vue @@ -313,7 +313,8 @@ function leaveTaskHandler() { overTask.value = null } function onEsc(event: KeyboardEvent) { - const eles = ['INPUT', 'TEXTAREA'] + + const eles = ['INPUT', 'TEXTAREA'] const keys = ['KeyC', 'KeyP', 'KeyX'] const code = event.code if (!(event.target instanceof Element))