From d948e6008ff7bd443ffe1f6e6b2f905ea5acebda Mon Sep 17 00:00:00 2001 From: Gitea Date: Fri, 14 Jul 2023 17:20:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RequirementEntityList.vue | 16 ++++++++++++--- .../RequirementEntityController.java | 20 +++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue index 20bda8a..b0847d3 100644 --- a/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue +++ b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue @@ -95,15 +95,14 @@ 编辑 - 详情 废弃 - 转化 + 撤销 - 撤销 + 转化 删除 @@ -194,6 +193,7 @@ importExcelUrl: "requiremententity/requirementEntity/importExcel", fq:"/requiremententity/requirementEntity/fq", hb:"/requiremententity/requirementEntity/hb", + cx:"/requiremententity/requirementEntity/cx", }, dictOptions:{}, @@ -209,6 +209,16 @@ }, }, methods: { + updateEntityStatus(id){ + getAction(this.url.cx,{id:id}).then((res)=>{ + if (res.success) { + this.$message.success(res.message); + this.loadData(); + }else{ + this.$message.warning(res.message); + } + }); + }, hb(hbsj){ console.log(hbsj) if(hbsj.length<2){ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java index 92da0c6..930322f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java @@ -200,6 +200,26 @@ public class RequirementEntityController extends JeecgController cx(@RequestParam(name="id",required=true) String id) { + RequirementEntity requirementEntity = requirementEntityService.getById(id); + if(requirementEntity==null) { + return Result.error("未找到对应数据"); + }else{ + requirementEntity.setEntityStatus(0); + requirementEntityService.updateById(requirementEntity); + } + return Result.OK("已撤销废除"); + } + /** * 合并 *