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("已撤销废除"); + } + /** * 合并 *