From d8dda543ab28f41e7f4b1477784bb2df10c5452d Mon Sep 17 00:00:00 2001 From: jzy <928294064@qq.com> Date: Mon, 13 Oct 2025 18:44:16 +0800 Subject: [PATCH] yangshi --- .../web/controller/system/ZhyPointController.java | 8 ++++ ruoyi-ui/src/views/system/SysPoint/index.vue | 51 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java index cb9d302..d2c6a09 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java @@ -145,6 +145,14 @@ public class ZhyPointController extends BaseController return AjaxResult.success(); } + @PostMapping("/insertPoint2") + public AjaxResult insert2(MultipartFile file) throws Throwable { + + System.out.println("!1111"); +// pointService.buildPoint(); + return AjaxResult.success(); + } + private String[] parseCsvLine(String line) { List result = new ArrayList<>(); StringBuilder current = new StringBuilder(); diff --git a/ruoyi-ui/src/views/system/SysPoint/index.vue b/ruoyi-ui/src/views/system/SysPoint/index.vue index a58d291..71ad86b 100644 --- a/ruoyi-ui/src/views/system/SysPoint/index.vue +++ b/ruoyi-ui/src/views/system/SysPoint/index.vue @@ -78,6 +78,10 @@ @click="handleImportRelation">导入文献 + 导入txt + + @@ -169,6 +173,25 @@ 取 消 + + + + +
将 txt 文件拖到此处,或 点击上传
+
+ 仅允许导入 .txt 格式文件(逗号分隔文本) +
+
+
+ + +
@@ -188,6 +211,15 @@ export default { updateSupport: 0, url: "http://"+process.env.VUE_APP_IP+"/system/SysPoint/insertPoint" }, + upload2: { + tip: "准备上传文件", + open: false, + title: "", + oprnIno: false, + isUploading: false, + updateSupport: 0, + url: "http://"+process.env.VUE_APP_IP+"/system/SysPoint/insertPoint2" + }, typeOptions: [ { label: '作者', value: 'author' }, { label: '机构', value: 'agency' }, @@ -237,18 +269,37 @@ export default { this.$message.success('导入补充文件成功'); this.getList() }, + handleFileSuccess2(response, file, fileList) { + this.upload2.open = false; + this.upload2.isUploading = false; + this.$refs.upload2.clearFiles(); + this.$message.success('导入补充文件成功'); + this.getList() + }, handleFileUploadProgressRelation(event, file, fileList) { this.upload1.isUploading = true; this.upload1.oprnIno = true; }, + handleFileUploadProgressRelation2(event, file, fileList) { + this.upload2.isUploading = true; + this.upload2.oprnIno = true; + + }, submitFileFormR() { this.$refs.upload1.submit(); }, + submitFileFormR2() { + this.$refs.upload2.submit(); + }, handleImportRelation() { this.upload1.title = "导入文献"; this.upload1.open = true; }, + handleImportRelation2() { + this.upload2.title = "导入文献"; + this.upload2.open = true; + }, deletAllInfo(){ this.$modal.confirm('是否确认删除全部的数据项?').then(function() {