master
admin 2 years ago
parent 83b4709792
commit bd4dfaf03d
  1. 15
      ant-design-vue-jeecg/src/views/fieldx/FieldxList.vue
  2. 14
      ant-design-vue-jeecg/src/views/tablex/TablexList.vue
  3. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java

@ -138,7 +138,7 @@
}
},
{
title:'对应实体id',
title:'对应实体',
align:"center",
dataIndex: 'tableId_dictText'
},
@ -245,8 +245,8 @@
}
},
created() {
this.getSuperFieldList();
this.loadParameter();
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
@ -256,17 +256,24 @@
methods: {
initDictConfig(){
},
searchReset() {
this.queryParam ={};
this.queryParam.tableId = this.tableId;
this.loadData(1);
},
//
loadParameter() {
if (this.loadRouteType == false) {
this.queryParam.tableId = this.$route.query.id;
this.tableId = this.$route.query.id;
console.log(this.tableId)
console.log(this.queryParam.tableId)
this.loadRouteType = true;
}
this.searchQuery();
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'tableId',text:'对应实体id',dictCode:'tablex,table_name,id'})
fieldList.push({type:'string',value:'tableId',text:'对应实体',dictCode:'tablex,table_name,id'})
fieldList.push({type:'string',value:'fieldName',text:'中文名称',dictCode:''})
fieldList.push({type:'string',value:'fieldEnName',text:'英文名称',dictCode:''})
fieldList.push({type:'sel_search',value:'type',text:'数据类型',dictTable:'', dictText:'', dictCode:'date_type'})

@ -88,9 +88,11 @@
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<template slot="htmlSlot" slot-scope="text,record">
<a @click="tablemanage(record.id)">实体管理</a>
<a-divider type="vertical" />
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
@ -202,6 +204,14 @@
align:"center",
dataIndex: 'verison'
},
{
title: '管理',
dataIndex: 'htmlSlot',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '操作',
dataIndex: 'action',

@ -97,6 +97,12 @@ public class TablexController extends JeecgController<Tablex, ITablexService> {
@ApiOperation(value="实体表-添加", notes="实体表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Tablex tablex) {
List<Tablex> tablexList = tablexService.list();
for (Tablex tablex1 : tablexList){
if (tablex1.getModuleId().equals(tablex.getModuleId())){
return Result.error("该模块已有实体,添加失败");
}
}
if (tablex.getModuleId() != null){
Modulex modulex = modulexService.getById(tablex.getModuleId());
tablex.setTableName(modulex.getModuleName());
@ -118,6 +124,12 @@ public class TablexController extends JeecgController<Tablex, ITablexService> {
@ApiOperation(value="实体表-编辑", notes="实体表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Tablex tablex) {
List<Tablex> tablexList = tablexService.list();
for (Tablex tablex1 : tablexList){
if (tablex1.getModuleId().equals(tablex.getModuleId())){
return Result.error("该模块已有实体,编辑失败");
}
}
if (tablex.getModuleId() != null){
Modulex modulex = modulexService.getById(tablex.getModuleId());
tablex.setTableName(modulex.getModuleName());

Loading…
Cancel
Save