From 3716dc00eadec2c00124150a93961197d268b840 Mon Sep 17 00:00:00 2001 From: shiji <1913712590@qq.com> Date: Wed, 5 Jul 2023 16:50:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E4=BD=93=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=98=BE=E7=A4=BA=20=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E9=A2=98=E6=98=BE=E7=A4=BA=20=EF=BC=88?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BA=86=E5=AE=9E=E4=BD=93=E8=A1=A8=20?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E8=AF=B7=E6=B1=82=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=98=AF=E5=90=A6=E6=9C=89=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/fieldx/FieldxList.vue | 11 +- .../src/views/tablex/TablexList.vue | 881 +++++++++++------- .../tablex/controller/TablexController.java | 33 +- 3 files changed, 577 insertions(+), 348 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/fieldx/FieldxList.vue b/ant-design-vue-jeecg/src/views/fieldx/FieldxList.vue index a3882c9..3100bb4 100644 --- a/ant-design-vue-jeecg/src/views/fieldx/FieldxList.vue +++ b/ant-design-vue-jeecg/src/views/fieldx/FieldxList.vue @@ -9,6 +9,7 @@ >
+ 实体名称:{{tableName}} - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - + @cancel="handleCancel"> + +
+ 模块名称:{{moduleName}} + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + height='auto' + + toolbar + :toolbarConfig="toolbarConfig" - \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java index b9728fc..a283457 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java @@ -1,8 +1,6 @@ package org.jeecg.modules.tablex.controller; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -86,7 +84,22 @@ public class TablexController extends JeecgController { IPage pageList = tablexService.page(page, queryWrapper); return Result.OK(pageList); } - + @AutoLog(value = "实体管理-通过模块查询实体") + @ApiOperation(value="实体管理-通过模块查询实体", notes="实体管理-通过模块查询实体") + @GetMapping(value = "/getTableByModuleId") + public Result getTableByModuleId(@RequestParam(name="moduleId",required=true) String moduleId){ + if (moduleId!=null){ + List tablexList = tablexService.list(new QueryWrapper().eq("module_id", moduleId)); + ArrayList hashMaps = new ArrayList<>(); + for (Tablex tablex:tablexList){ + HashMap hashMap = new HashMap<>(); + hashMap.put("text",tablex.getTableName()); + hashMap.put("value",tablex.getId()); + hashMaps.add(hashMap); + } + return Result.OK(hashMaps); + }else return Result.error("未找到数据,请重试"); + } /** * 添加 * @@ -127,12 +140,12 @@ public class TablexController extends JeecgController { @PutMapping(value = "/edit") public Result edit(@RequestBody Tablex tablex) { tablex.setVerison(tablex.getVerison()+1); - List tablexList = tablexService.list(); - for (Tablex tablex1 : tablexList){ - if (tablex1.getModuleId().equals(tablex.getModuleId())){ - return Result.error("该模块已有实体,编辑失败"); - } - } +// List tablexList = tablexService.list(); +// for (Tablex tablex1 : tablexList){ +// if (tablex1.getModuleId().equals(tablex.getModuleId())){ +// return Result.error("该模块已有实体,编辑失败"); +// } +// } if (tablex.getModuleId() != null){ Modulex modulex = modulexService.getById(tablex.getModuleId()); tablex.setTableName(modulex.getModuleName());