需求类型

master
Gitea 1 year ago
parent 54bf2a7e44
commit feb826a916
  1. 4
      ant-design-vue-jeecg/src/views/requirementtype/RequirementTypeList.vue
  2. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementtype/controller/RequirementTypeController.java

@ -30,10 +30,10 @@
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <!-- <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
</a-dropdown> </a-dropdown>
</div> </div>

@ -109,9 +109,17 @@ public class RequirementTypeController extends JeecgController<RequirementType,
@AutoLog(value = "需求类型-通过id删除") @AutoLog(value = "需求类型-通过id删除")
@ApiOperation(value="需求类型-通过id删除", notes="需求类型-通过id删除") @ApiOperation(value="需求类型-通过id删除", notes="需求类型-通过id删除")
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) { public Result<?> delete(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
requirementTypeService.removeById(id); RequirementType requirementType = new RequirementType();
return Result.OK("删除成功!"); QueryWrapper<RequirementType> queryWrapper = QueryGenerator.initQueryWrapper(requirementType, req.getParameterMap());
queryWrapper.eq("upper_id",id);
List<RequirementType> list = requirementTypeService.list(queryWrapper);
if(list.size()>0){
return Result.error("包含有下级需求类型,无法删除");
}else{
requirementTypeService.removeById(id);
return Result.OK("删除成功!");
}
} }
/** /**

Loading…
Cancel
Save