Gitea 1 year ago
parent be563b2933
commit 27568c0364
  1. 26
      ant-design-vue-jeecg/src/views/requiremententity/RequirementEntityList.vue
  2. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/entity/RequirementEntity.java
  3. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java

@ -104,6 +104,8 @@
<a-divider type="vertical" />
<a @click="zh(record)">转化</a>
<a-divider type="vertical" />
<a :disabled="record.entityStatus==9" @click="zd(record)">字段</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
@ -115,6 +117,7 @@
<requirement-entity-modal ref="modalForm" @ok="modalFormOk"></requirement-entity-modal>
<requirement-entity-modal1 ref="modalForm1" @ok="modalFormOk"></requirement-entity-modal1>
<tablex-modal1 ref="modalForm2" @ok="modalFormOk"></tablex-modal1>
<FieldxList ref="FieldxList"></FieldxList>
</a-card>
</template>
@ -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("已废弃,不可转化");

@ -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;
}

@ -169,6 +169,8 @@ public class TablexController extends JeecgController<Tablex, ITablexService> {
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("转化成功!");
}

Loading…
Cancel
Save