From b6ff39d0e8be1ded42db7274abd4687e3a7fa97b Mon Sep 17 00:00:00 2001 From: wxc <191104855@qq.com> Date: Thu, 14 Mar 2024 19:17:14 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/org/department.ts | 4 + src/api/perms/admin.ts | 4 + src/components/FileList.vue | 140 ++++++-- src/components/PoliceSelect.vue | 3 +- src/layout/components/NoticeMessage.vue | 32 +- src/utils/socket.ts | 8 +- src/views/home/components/DataStatistics.vue | 12 +- src/views/work/Done.vue | 2 +- src/views/work/Todo.vue | 2 +- src/views/work/components/MailDialog.vue | 15 +- src/views/work/components/MailReturn.vue | 2 +- src/views/work/components/ReviewComments.vue | 34 +- .../work/components/templates/CoHandling.vue | 2 +- .../templates/CoHandlingPoliceEdit.vue | 35 +- .../components/templates/ThreeHandling.vue | 302 ++++++++++++++---- 15 files changed, 445 insertions(+), 152 deletions(-) diff --git a/src/api/org/department.ts b/src/api/org/department.ts index 45cba7e..f8cea02 100644 --- a/src/api/org/department.ts +++ b/src/api/org/department.ts @@ -5,6 +5,10 @@ export function deptLists(params?: any) { return request.get({ url: '/system/dept/list', params }) } +export function deptAll() { + return request.get({ url: '/system/dept/all/tree' }) +} + // 添加部门 export function deptAdd(params: any) { return request.post({ url: '/system/dept/add', params }) diff --git a/src/api/perms/admin.ts b/src/api/perms/admin.ts index 53bdaf3..549e911 100644 --- a/src/api/perms/admin.ts +++ b/src/api/perms/admin.ts @@ -58,6 +58,10 @@ export function listByCurrentEmpNo(query) { return request.get({ url: '/system/admin/listByCurrentEmpNo', query}) } +export function listByCoHanding() { + return request.get({ url: '/system/admin/listByCoHanding'}) +} + // 重置密码 export function resetPassword(params: any) { return request.post({ url: '/system/resetPassword', params }) diff --git a/src/components/FileList.vue b/src/components/FileList.vue index d021635..b9033c5 100644 --- a/src/components/FileList.vue +++ b/src/components/FileList.vue @@ -52,7 +52,10 @@ {{ item.orgiinFilename }} -
+
+ +
- {{ fileList.indexOf(activeFile) + 1 }} / {{ fileList.length }} + {{ fileList.indexOf(activeFile) + 1 }} / + {{ fileList.length }}
+ +
- + + @@ -157,25 +194,38 @@ const preview = ref(false); const activeFile = ref({}); const fileRrror = ref(false); const imgRef = ref(); -let scale = 1; +let rotate = 0; + +function prev() { + const index = fileList.value.indexOf(activeFile.value); + if (index === 0) { + filePreview(fileList.value[fileList.value.length - 1]) + } else { + filePreview(fileList.value[index - 1]) + } +} +function next() { + const index = fileList.value.indexOf(activeFile.value); + if (index === fileList.value.length - 1) { + filePreview(fileList.value[0]) + } else { + filePreview(fileList.value[index + 1]) + } +} function filePreview(file) { preview.value = true; fileRrror.value = false; activeFile.value = file; - nextTick(() => { - if (imgRef.value) { - scale = 1; - imgRef.value.addEventListener("wheel", function (event) { - if (event.deltaY > 0) { - scale += 0.1; - } - if (event.deltaY < 0 && scale > 0.1) { - scale -= 0.1; - } - imgRef.value.style.transform = `scale(${scale})`; - }); - } - }); + rotate = 0 + imgRef.value.style.transform = `rotate(0deg)`; +} + +function rotateLeft() { + imgRef.value.style.transform = `rotate(${(rotate += 90)}deg)`; +} + +function rotateRight() { + imgRef.value.style.transform = `rotate(${(rotate -= 90)}deg)`; } function getIconName(filetype) { @@ -213,11 +263,13 @@ function download() { } function getDocFilepath() { - if (activeFile.value.type === 'application/msword' && activeFile.value.docxFilepath) { - return `${VITE_API_URL}/api/file/stream/${activeFile.value.docxFilepath}` + if ( + activeFile.value.type === "application/msword" && + activeFile.value.docxFilepath + ) { + return `${VITE_API_URL}/api/file/stream/${activeFile.value.docxFilepath}`; } - return `${VITE_API_URL}/api/file/stream/${activeFile.value.filepath}` - + return `${VITE_API_URL}/api/file/stream/${activeFile.value.filepath}`; }