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 @@