From 9adef740561310a5702c2a3da45fb30982704055 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Tue, 29 Oct 2024 18:14:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=AE=97=E4=B9=A6-=E4=B8=93=E9=A1=B9?= =?UTF-8?q?=E7=BB=8F=E8=B4=B9=E9=A2=84=E7=AE=97=20=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=2010.29?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ProjectFileController.java | 8 ++ .../demo/projectFile/entity/ProjectFile.java | 6 ++ .../kejigongguan/xiangmushu/ZhengWenDemo.vue | 97 +++++++++++++------ .../kejigongguan/xiangmushu/index.vue | 2 +- .../src/views/projectFile/ProjectFile.data.ts | 10 ++ .../zhengwen/ProjectFile4ZhengWen.data.ts | 14 ++- .../zhengwen/components/ProjectFileModal.vue | 2 +- 7 files changed, 108 insertions(+), 31 deletions(-) diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/controller/ProjectFileController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/controller/ProjectFileController.java index f7f3b04..eb7a23a 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/controller/ProjectFileController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/controller/ProjectFileController.java @@ -88,6 +88,14 @@ public class ProjectFileController extends JeecgController add(@RequestBody ProjectFile projectFile) { + String fileUrl = projectFile.getFileUrl(); + String[] fileArr = fileUrl.split("/"); + String fileTemp = fileArr[1]; + projectFile.setFileName(fileTemp); + String[] fileArr2 = fileTemp.split("\\."); + String fileName = fileArr2[0]; + String fileType = fileArr2[1]; + projectFile.setFileType(fileType); projectFileService.save(projectFile); return Result.OK("添加成功!"); } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/entity/ProjectFile.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/entity/ProjectFile.java index 7b02353..4e00bc9 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/entity/ProjectFile.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/entity/ProjectFile.java @@ -74,4 +74,10 @@ public class ProjectFile implements Serializable { // @Excel(name = "附件地址", width = 255) @ApiModelProperty(value = "附件标识 fujian:附件tab页显示,zhengwen:正文件tab页显示") private java.lang.String fileFlag; + + @ApiModelProperty(value = "附件名称") + private java.lang.String fileName; + + @ApiModelProperty(value = "附件类型") + private java.lang.String fileType; } diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhengWenDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhengWenDemo.vue index 94f9630..9fe392c 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhengWenDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhengWenDemo.vue @@ -1,10 +1,18 @@