From ce3ffb6cd99876a0d77adbfa285df4b50f51beed Mon Sep 17 00:00:00 2001 From: jzy <928294064@qq.com> Date: Thu, 11 Sep 2025 22:28:29 +0800 Subject: [PATCH] yangshi --- gyxtp/src/view/pointInfo.vue | 28 ++++++++++++++++++++++ gyxtp/src/view/small.vue | 1 - .../api/controller/TestXiaoTuPuController.java | 24 ++++++++++++++++--- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/gyxtp/src/view/pointInfo.vue b/gyxtp/src/view/pointInfo.vue index f33d832..160b980 100644 --- a/gyxtp/src/view/pointInfo.vue +++ b/gyxtp/src/view/pointInfo.vue @@ -41,6 +41,32 @@ {{pointInfo.name}} +
+
+
+
+
+
+ + {{ Object.keys(item)[0] }} + +
+ {{c.author}} + {{c.agency}} + {{c.keyword}} +
+
+
+ +
+
+
+
@@ -70,6 +96,7 @@ export default { }, data() { return { + tableData:[], pointInfo:{ name:"", dbid:"", @@ -92,6 +119,7 @@ export default { } getReInfoByNameAndType(this.pointInfo.name,this.pointInfo.type).then((r2)=>{ console.log(r2) + this.tableData = r2 }) }) }, diff --git a/gyxtp/src/view/small.vue b/gyxtp/src/view/small.vue index 985c5fe..32855dc 100644 --- a/gyxtp/src/view/small.vue +++ b/gyxtp/src/view/small.vue @@ -358,7 +358,6 @@ export default { id: row.id } }) - }, getColor(type){ let res = "rgb(227,203,0)" diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/controller/TestXiaoTuPuController.java b/ruoyi-api/src/main/java/com/ruoyi/api/controller/TestXiaoTuPuController.java index bf3da60..d28edf5 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/controller/TestXiaoTuPuController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/controller/TestXiaoTuPuController.java @@ -164,7 +164,7 @@ public class TestXiaoTuPuController extends BaseController { return a; } @GetMapping("getReInfoByNameAndType/{name}/{type}") - public List selectPointRelationshipByName(@PathVariable("name")String name,@PathVariable("type")String type) throws IOException { + public List>>> selectPointRelationshipByName(@PathVariable("name")String name,@PathVariable("type")String type) throws IOException { String author = ""; String keyword = ""; String agency = ""; @@ -182,8 +182,26 @@ public class TestXiaoTuPuController extends BaseController { title = name; } - List a = zhyPointMapper.selectPointRelationshipByName(author,keyword,agency,title); - return a; +// 1. 查询 + List records = zhyPointMapper.selectPointRelationshipByName(author,keyword,agency,title); + +// 2. 按 title 分组 + Map>> grouped = new HashMap<>(); + for (Map record : records) { + if (record == null) continue; + String title1 = Objects.toString(record.get("title"), "unknown"); + grouped.computeIfAbsent(title1, k -> new ArrayList<>()).add(record); + } + +// 3. 转为 List>> + List>>> result = new ArrayList<>(); + for (String title1 : grouped.keySet()) { + Map>> map = new HashMap<>(); + map.put(title1, grouped.get(title1)); + result.add(map); + } + + return result; }