From c3aefcaafdd29c9a48c3d9600cb2533860513f9f Mon Sep 17 00:00:00 2001 From: Guo XIn <371864209@qq.com> Date: Thu, 24 Aug 2023 19:19:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E8=A1=A8=E5=88=97=E8=A1=A8=E9=A1=B5=E9=80=82?= =?UTF-8?q?=E9=85=8D=E8=A1=A8=E5=8D=95=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/js/business/metadata/metadata.js | 14 ++++++++++---- .../resources/static/js/sys/form/formConfig.js | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/shandan-bianmu/src/main/resources/static/js/business/metadata/metadata.js b/shandan-bianmu/src/main/resources/static/js/business/metadata/metadata.js index e8750e7..8dbf171 100644 --- a/shandan-bianmu/src/main/resources/static/js/business/metadata/metadata.js +++ b/shandan-bianmu/src/main/resources/static/js/business/metadata/metadata.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 => `${data.metadataName}` }, - {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) { diff --git a/shandan-system/src/main/resources/static/js/sys/form/formConfig.js b/shandan-system/src/main/resources/static/js/sys/form/formConfig.js index 40f78a4..0eb040b 100644 --- a/shandan-system/src/main/resources/static/js/sys/form/formConfig.js +++ b/shandan-system/src/main/resources/static/js/sys/form/formConfig.js @@ -34,7 +34,7 @@ class FormConfigComponent { templet: (data) => renderSwitch('isDisabled', data) }, { - field: 'isDisabled', + field: 'isShow', title: '是否显示', templet: (data) => renderSwitch('isShow', data) },