|
@@ -30,6 +30,8 @@ public class CdColumnsShowServiceImpl extends ServiceImpl<CdColumnsShowMapper, C
|
|
|
@Autowired
|
|
|
TbTableInfoMapper tbTableInfoMapper;
|
|
|
|
|
|
+ Map<String, Object> tableColumnLength = new HashMap<>();
|
|
|
+
|
|
|
@Override
|
|
|
public void saveBuchColumnsShow(CdColumnsShow cdColumnsShow) {
|
|
|
//删除业务表下的显示列数据
|
|
@@ -69,6 +71,10 @@ public class CdColumnsShowServiceImpl extends ServiceImpl<CdColumnsShowMapper, C
|
|
|
queryWrapper.lambda().eq(CdColumnsShow::getPkOrg,loginUser.getOrgCode());
|
|
|
queryWrapper.lambda().eq(CdColumnsShow::getTableName,cdColumnsShow.getTableName());
|
|
|
queryWrapper.lambda().orderByAsc(CdColumnsShow::getSort);
|
|
|
+ List<Map<String,Object>> tableColumnListLength =tbTableInfoMapper.getTableColumnLength(cdColumnsShow.getTableName());
|
|
|
+ for (Map<String,Object> m:tableColumnListLength){
|
|
|
+ tableColumnLength.put(cdColumnsShow.getTableName()+"__"+m.get("db_field_name").toString(),m.get("field_length"));
|
|
|
+ }
|
|
|
List<CdColumnsShow> cdColumnsShowList=this.list(queryWrapper);
|
|
|
if(cdColumnsShowList!=null&&cdColumnsShowList.size()>0){//保存过则直接查询显示列表
|
|
|
for(CdColumnsShow columnsShow:cdColumnsShowList){
|
|
@@ -113,6 +119,9 @@ public class CdColumnsShowServiceImpl extends ServiceImpl<CdColumnsShowMapper, C
|
|
|
c1.put("title",title);
|
|
|
c1.put("dataIndex",dataIndex);
|
|
|
c1.put("key",key);
|
|
|
+ if(tableColumnLength !=null && tableColumnLength.containsKey(key)){
|
|
|
+ c1.put("width",tableColumnLength.get(key));
|
|
|
+ }
|
|
|
if(isScopedSlots.equals("2")){
|
|
|
Map<String,Object> map=new HashMap<>();
|
|
|
map.put("customRender",key);
|