From 401a6719f6083a034959c373ab9c191769240d51 Mon Sep 17 00:00:00 2001 From: oneao Date: Mon, 23 Mar 2026 21:12:09 +0800 Subject: [PATCH] u --- .../cn/g3soft/controller/FileController.java | 4 +- code/container-ocr/ocr-vue/components.d.ts | 1 - .../ocr-vue/src/components/g3-file/index.vue | 177 ++++++--- .../ocr-vue/src/layout/components/tab.vue | 64 +++- .../ocr-vue/src/layout/components/topbar.vue | 15 +- code/container-ocr/ocr-vue/src/request/api.js | 6 +- code/container-ocr/ocr-vue/src/utils/file.js | 343 +++++++++--------- .../ocr-vue/src/views/system/field/index.vue | 2 + .../views/system/oa/notice/edit-drawer.vue | 39 +- .../src/views/system/oa/notice/index.vue | 36 +- .../src/views/system/oa/reminder/index.vue | 53 ++- .../src/views/system/permission/index.vue | 24 +- 12 files changed, 487 insertions(+), 277 deletions(-) diff --git a/code/container-ocr/ocr-springboot/src/main/java/cn/g3soft/controller/FileController.java b/code/container-ocr/ocr-springboot/src/main/java/cn/g3soft/controller/FileController.java index 0ac8345e..3fad3b03 100644 --- a/code/container-ocr/ocr-springboot/src/main/java/cn/g3soft/controller/FileController.java +++ b/code/container-ocr/ocr-springboot/src/main/java/cn/g3soft/controller/FileController.java @@ -56,11 +56,11 @@ public class FileController { @PostMapping("/delete") @Transactional(rollbackFor = Exception.class) public Result deleteFile(@RequestBody Map params) { - ValidationUtils.checkRequiredFields(params, "id", "tableName", "bucketName"); + ValidationUtils.checkRequiredFields(params, "subid", "tableName", "bucketName"); String tableName = params.get("tableName").toString(); String bucketName = params.get("bucketName").toString(); - String id = params.get("id").toString(); + String id = params.get("subid").toString(); // 查询数据 List> maps = dbUtils.loadData("SELECT * FROM " + tableName + " WHERE subid = ?", id); diff --git a/code/container-ocr/ocr-vue/components.d.ts b/code/container-ocr/ocr-vue/components.d.ts index d1153be7..791e021b 100644 --- a/code/container-ocr/ocr-vue/components.d.ts +++ b/code/container-ocr/ocr-vue/components.d.ts @@ -12,7 +12,6 @@ export {} declare module 'vue' { export interface GlobalComponents { Directory: typeof import('./src/components/wang-editor/modules/directory.vue')['default'] - ElAlert: typeof import('element-plus/es')['ElAlert'] ElButton: typeof import('element-plus/es')['ElButton'] ElCard: typeof import('element-plus/es')['ElCard'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] diff --git a/code/container-ocr/ocr-vue/src/components/g3-file/index.vue b/code/container-ocr/ocr-vue/src/components/g3-file/index.vue index a58f612b..65d740c4 100644 --- a/code/container-ocr/ocr-vue/src/components/g3-file/index.vue +++ b/code/container-ocr/ocr-vue/src/components/g3-file/index.vue @@ -349,7 +349,11 @@ async function uploadLocalFiles(files) { const tempUrl = URL.createObjectURL(blob); if (file.size > 512000) { - const { url, size, blob: compressedBlob } = await compressImage(tempUrl); + const { + url, + size, + blob: compressedBlob, + } = await compressImage(tempUrl); fileInfo.mx_mapfilename = url; fileInfo.mx_filesize = size; @@ -494,7 +498,9 @@ async function handleDownloadFile(file) { function handleShowPreview(file) { console.log(file); if (isImage(file.mx_fileext)) { - const index = previewImageList.value.findIndex((item) => item === file.mx_mapfilename); + const index = previewImageList.value.findIndex( + (item) => item === file.mx_mapfilename, + ); if (index !== -1) { preViewImageIndex.value = index; @@ -507,7 +513,10 @@ function handleShowPreview(file) { if (isExcel(file.mx_fileext)) { // https://view.officeapps.live.com/op/view.aspx?src= - window.open(`https://view.officeapps.live.com/op/view.aspx?src=${fileUrl}`, "_blank"); + window.open( + `https://view.officeapps.live.com/op/view.aspx?src=${fileUrl}`, + "_blank", + ); } else { window.open(fileUrl, "_blank"); } @@ -517,7 +526,9 @@ function handleShowPreview(file) { function handleDownloadPreviewImage(index) { const previewFileUrl = previewImageList.value[index]; - const previewFile = fileList.value.find((item) => item.mx_mapfilename === previewFileUrl); + const previewFile = fileList.value.find( + (item) => item.mx_mapfilename === previewFileUrl, + ); if (previewFile) { handleDownloadFile(previewFile); @@ -558,7 +569,7 @@ async function deleteFiles(files) { try { for (const item of files) { if (item.subid) { - await deleteFileApi("bf_file", item.subid); + await deleteFileApi(item.subid); } } @@ -587,12 +598,12 @@ async function handleSave() { loading.value = true; loadingTip.value = "正在保存中 . . ."; - const { insertdata, updatedata, deletedata, hasChanges } = compareAndClassifyData( - fileList.value, - oldFileList.value, - "subid", - ["_content", "_status", "checked"], - ); + const { insertdata, updatedata, deletedata, hasChanges } = + compareAndClassifyData(fileList.value, oldFileList.value, "subid", [ + "_content", + "_status", + "checked", + ]); // 处理新增的文件 for (const item of insertdata) { @@ -679,7 +690,9 @@ function handleTreeNodeClick(data) {
附件管理({{ fileList.length }}) - +
+ + + 打包下载 @@ -729,6 +745,9 @@ function handleTreeNodeClick(data) { :disabled="checkedFiles.length === 0 || loading" @click="handleBatchDelete()" > + + + 批量删除 @@ -738,7 +757,7 @@ function handleTreeNodeClick(data) { 模式:{{ displayMode === 0 ? "卡片视图" : "列表视图" }} - +