Gitea 1 year ago
parent 7c75938263
commit d948e6008f
  1. 16
      ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue
  2. 20
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java

@ -95,15 +95,14 @@
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a> <a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="fq(record.id)">废弃</a> <a @click="fq(record.id)">废弃</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="zh(record)">转化</a> <a :disabled="record.entityStatus!=9" @click="updateEntityStatus(record.id)">撤销</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a :disabled="record.entityStatus!=9" @click="updateEntityStatus(record,'9')">撤销</a> <a @click="zh(record)">转化</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
@ -194,6 +193,7 @@
importExcelUrl: "requiremententity/requirementEntity/importExcel", importExcelUrl: "requiremententity/requirementEntity/importExcel",
fq:"/requiremententity/requirementEntity/fq", fq:"/requiremententity/requirementEntity/fq",
hb:"/requiremententity/requirementEntity/hb", hb:"/requiremententity/requirementEntity/hb",
cx:"/requiremententity/requirementEntity/cx",
}, },
dictOptions:{}, dictOptions:{},
@ -209,6 +209,16 @@
}, },
}, },
methods: { 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){ hb(hbsj){
console.log(hbsj) console.log(hbsj)
if(hbsj.length<2){ if(hbsj.length<2){

@ -200,6 +200,26 @@ public class RequirementEntityController extends JeecgController<RequirementEnti
return Result.OK("已废弃"); return Result.OK("已废弃");
} }
/**
* 撤销废除
*
* @param id
* @return
*/
@AutoLog(value = "撤销废除")
@ApiOperation(value="撤销废除", notes="撤销废除")
@GetMapping(value = "/cx")
public Result<?> 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("已撤销废除");
}
/** /**
* 合并 * 合并
* *

Loading…
Cancel
Save