新增:数据资源表列表页适配表单配置

master
Guo XIn 1 year ago
parent 7005a36be6
commit c3aefcaafd
  1. 14
      shandan-bianmu/src/main/resources/static/js/business/metadata/metadata.js
  2. 2
      shandan-system/src/main/resources/static/js/sys/form/formConfig.js

@ -12,8 +12,11 @@ layui.use(['layer', 'listPage', 'form', 'dict'], function () {
let height = $(document).height();
height = height < 650 ? height : height * 0.8;
let where = {metadataName: '', reviewStatus: '', useStatus: ''};
const fieldMap = new Map()
METADATA_FORM_CONFIG.forEach(conf=>fieldMap.set(conf.fieldName, conf));
console.info(fieldMap);
const listPage = layui.listPage.init({
deleteUrl: `${ctx}/business/metadata/delete`,
table: {
@ -27,23 +30,26 @@ layui.use(['layer', 'listPage', 'form', 'dict'], function () {
{
field: 'metadataName',
title: '数据名称',
hide: !fieldMap.get('metadataName').isShow,
templet: data => `<lable style="font-weight: ${data.hasMark ? 'bold' : 'italic'};">${data.metadataName}</lable>`
},
{field: 'metadataComment', title: '中文注释'},
{field: 'metadataComment', title: '中文注释',hide: fieldMap.get('metadataName').isShow},
{
field: 'secretLevel',
title: '密级',
hide: !fieldMap.get('secretLevel').isShow,
templet: data => layui.dict.getDictDesc('secret_level', data.secretLevel)
},
{field: 'themeTask', title: '主题任务'},
{field: 'themeTask', title: '主题任务', hide: !fieldMap.get('themeTask').isShow},
{
field: 'dataFrom',
title: '数据来源',
hide: !fieldMap.get('dataFrom').isShow,
width: 100,
templet: data => layui.dict.getDictDesc('data_source', data.dataFrom)
},
{field: 'collectionTime', title: '任务时间', width: 180, align: 'center'},
{field: 'collectionTime', title: '任务时间', width: 180, align: 'center',hide: !fieldMap.get('collectionTime').isShow},
{
field: 'used', title: '关联状态', width: 120, align: 'center', templet: (data) => {
if (data.used) {

@ -34,7 +34,7 @@ class FormConfigComponent {
templet: (data) => renderSwitch('isDisabled', data)
},
{
field: 'isDisabled',
field: 'isShow',
title: '是否显示',
templet: (data) => renderSwitch('isShow', data)
},