diff --git a/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue
index b0847d3..ebb58f0 100644
--- a/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue
+++ b/ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue
@@ -104,6 +104,8 @@
转化
+ 字段
+
handleDelete(record.id)">
删除
@@ -115,6 +117,7 @@
+
@@ -128,12 +131,13 @@
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { httpAction, getAction } from '@/api/manage'
import TablexModal1 from '../tablex/modules/TablexModal1'
+ import FieldxList from "@views/fieldx/FieldxList.vue"
export default {
name: 'RequirementEntityList',
mixins:[JeecgListMixin, mixinDevice],
components: {
- RequirementEntityModal,RequirementEntityModal1,TablexModal1
+ RequirementEntityModal,RequirementEntityModal1,TablexModal1,FieldxList
},
data () {
return {
@@ -209,6 +213,24 @@
},
},
methods: {
+ zd(record){
+ if(record.moduleId!=null){
+ let s = null
+ getAction('/tablex/tablex/list', { moduleId: record.moduleId}).then((res) => {
+ s = res.result.records;
+ if (s[0] == null) {
+ this.$message.error("请先转化");
+ } else {
+ this.$refs.FieldxList.showModal();
+ this.$refs.FieldxList.edit(s[0]);
+ this.$refs.FieldxList.disableSubmit = false
+ }
+ })
+ }else{
+ this.$message.error("请先转化");
+ }
+
+ },
updateEntityStatus(id){
getAction(this.url.cx,{id:id}).then((res)=>{
if (res.success) {
@@ -244,7 +266,7 @@
});
},
zh(record){
- if(record.entityStatus===3){
+ if(record.entityStatus===3||record.tableId!=null){
this.$message.warning("已转化,不可再次转化");
}else if(record.entityStatus===9){
this.$message.warning("已废弃,不可转化");
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/entity/RequirementEntity.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/entity/RequirementEntity.java
index a194949..97bb8bf 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/entity/RequirementEntity.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/entity/RequirementEntity.java
@@ -76,4 +76,12 @@ public class RequirementEntity implements Serializable {
@Dict(dicCode = "entity_status")
@ApiModelProperty(value = "实体状态")
private java.lang.Integer entityStatus;
+ /**实体id*/
+ @Excel(name = "实体id", width = 15)
+ @ApiModelProperty(value = "实体id")
+ private java.lang.String tableId;
+ /**对应模块id*/
+ @Excel(name = "对应模块id", width = 15)
+ @ApiModelProperty(value = "对应模块id")
+ private java.lang.String moduleId;
}
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 1018013..7b0296c 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
@@ -169,6 +169,8 @@ public class TablexController extends JeecgController {
tablexService.save(tablex);
modulexService.setmodule(tablex.getId(), tablex.getModuleId());
requirementEntity.setEntityStatus(3);
+ requirementEntity.setTableId(tablex.getId());
+ requirementEntity.setModuleId(tablex.getModuleId());
requirementEntityService.updateById(requirementEntity);
return Result.OK("转化成功!");
}