参数项收集清单-动态表头添加认证类型

This commit is contained in:
zhn
2023-10-30 18:00:57 +08:00
parent 2fded9534a
commit e70a42c824
2 changed files with 1125 additions and 1094 deletions
@@ -1533,6 +1533,23 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
//过滤列表字段(is_show_list-->列表是否显示0否 1是) //过滤列表字段(is_show_list-->列表是否显示0否 1是)
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList()); fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
} }
//参数项认证清单-认证类型
List<String> categoryList = new ArrayList<>();
if(ModuleEnum.PARAMS_COLLECT_MANIFEST.getValue().equals(flag)){
List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByDictCode("cert_category");
if(ObjectUtil.isNotEmpty(sysDictItemList)){
categoryList = sysDictItemList.stream().map(SysDictItem::getItemValue).collect(Collectors.toList());
}
List<OnlCgformField> onlCgformFieldList = new LinkedList<>();
for (SysDictItem sysDictItem : sysDictItemList) {
OnlCgformField onlCgformField = new OnlCgformField();
onlCgformField.setDbFieldTxt(sysDictItem.getItemText());
onlCgformField.setDbFieldEnName(sysDictItem.getEnName());
onlCgformField.setDbFieldName(sysDictItem.getItemValue());
onlCgformFieldList.add(onlCgformField);
}
fieldList.addAll(onlCgformFieldList);
}
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId); ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId);
List<Map<String, Object>> listConfig = new LinkedList<>(); List<Map<String, Object>> listConfig = new LinkedList<>();
@@ -1590,6 +1607,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
if (!"references_col".equals(dbFieldName)) { if (!"references_col".equals(dbFieldName)) {
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName)); map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));
} }
if(ObjectUtil.isNotEmpty(categoryList) && categoryList.contains(dbFieldName)){
map.put("show", "1");//认证类型动态表头默认不展示,列表设置展示,用show=1来区分
map.put("sort", "true");
}
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
if ("references_col".equals(dbFieldName)) { if ("references_col".equals(dbFieldName)) {
if (ObjectUtils.isNotEmpty(paramsManifestEO) && StringUtils.isNotBlank(paramsManifestEO.getReferencesColName())) { if (ObjectUtils.isNotEmpty(paramsManifestEO) && StringUtils.isNotBlank(paramsManifestEO.getReferencesColName())) {
@@ -908,7 +908,10 @@ export default {
if (res.headFieldCn == '操作') { if (res.headFieldCn == '操作') {
res.field = 'operation' res.field = 'operation'
} }
if (!res.show) {
checkedList.push(res.field) checkedList.push(res.field)
}
// checkedList.push(res.field)
if (res.type) { if (res.type) {
// console.log('配置') // console.log('配置')
this.columns.push({ this.columns.push({
@@ -934,7 +937,8 @@ export default {
// ellipsis: true, // ellipsis: true,
fixed: res.click5 ? 'left' : '', fixed: res.click5 ? 'left' : '',
sorter: res.sort, sorter: res.sort,
width: 160 width: 160,
show: res.show
}) })
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'titleName' customRender: 'titleName'
@@ -980,6 +984,12 @@ export default {
this.colIndexs.push(index) this.colIndexs.push(index)
} }
}) })
for (let i = 0; i < this.columns.length; i++) {
if (this.columns[i].show == '1') {
this.columns.splice(i, 1)
i--
}
}
this.columns = [...this.columns] this.columns = [...this.columns]
this.colIndexs.forEach((item) => { this.colIndexs.forEach((item) => {
this.minWidthColumns.push([this.columns[item], 300]) this.minWidthColumns.push([this.columns[item], 300])