|
|
@ -134,6 +134,7 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
url: `${ctx}/search/metadata/all/page/${id}`, |
|
|
|
url: `${ctx}/search/metadata/all/page/${id}`, |
|
|
|
height: 'full-110', |
|
|
|
height: 'full-110', |
|
|
|
method: 'post', |
|
|
|
method: 'post', |
|
|
|
|
|
|
|
autoSort: false, |
|
|
|
defaultToolbar: [{ |
|
|
|
defaultToolbar: [{ |
|
|
|
title: '导出' //标题
|
|
|
|
title: '导出' //标题
|
|
|
|
, layEvent: 'export' //事件名,用于 toolbar 事件中使用
|
|
|
|
, layEvent: 'export' //事件名,用于 toolbar 事件中使用
|
|
|
@ -143,17 +144,17 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
limit: 30, |
|
|
|
limit: 30, |
|
|
|
cols: [[ |
|
|
|
cols: [[ |
|
|
|
{field: 'id', title: 'ID', hide: true}, |
|
|
|
{field: 'id', title: 'ID', hide: true}, |
|
|
|
{field: 'resourceName', title: '数据名称', width: 300}, |
|
|
|
{field: 'resourceName', title: '数据名称', width: 300,sort: true}, |
|
|
|
{field: 'resourceComment', title: '中文注释/描述'}, |
|
|
|
{field: 'resourceComment', title: '中文注释/描述',sort: true}, |
|
|
|
{field: 'directoryPath', title: '资源路径'}, |
|
|
|
{field: 'directoryPath', title: '资源路径',sort: true}, |
|
|
|
{field: 'themeTask', title: '主题任务', hide: true}, |
|
|
|
{field: 'themeTask', title: '主题任务', hide: true,sort: true}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
field: 'dataSource', |
|
|
|
field: 'dataSource', |
|
|
|
title: '数据来源', |
|
|
|
title: '数据来源', |
|
|
|
width: 160, |
|
|
|
width: 160, |
|
|
|
templet: (data) => DICT.getText("data_source", data.dataSource) || data.dataSource || '' |
|
|
|
templet: (data) => DICT.getText("data_source", data.dataSource) || data.dataSource || '',sort: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{field: 'taskTime', title: '任务时间', width: 180, align: 'center'}, |
|
|
|
{field: 'taskTime', title: '任务时间', width: 180, align: 'center',sort: true}, |
|
|
|
{field: 'modifyTime', title: '注册时间', width: 160, align: 'center', hide: true}, |
|
|
|
{field: 'modifyTime', title: '注册时间', width: 160, align: 'center', hide: true}, |
|
|
|
{fixed: 'right', title: '操作', toolbar: '#rowToolBar', width: 100, align: 'center'} |
|
|
|
{fixed: 'right', title: '操作', toolbar: '#rowToolBar', width: 100, align: 'center'} |
|
|
|
]], |
|
|
|
]], |
|
|
@ -172,6 +173,16 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
metaListTable.gtable.on('sort', function(data){ |
|
|
|
|
|
|
|
console.info(data); |
|
|
|
|
|
|
|
const {field, type} = data; |
|
|
|
|
|
|
|
let sort = type; |
|
|
|
|
|
|
|
if(!sort || sort === 'null'){ |
|
|
|
|
|
|
|
sort = undefined; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
metaListTable.where.sort={field: field.trim(), sort: sort} |
|
|
|
|
|
|
|
beginSearch(); |
|
|
|
|
|
|
|
}) |
|
|
|
metaListTable.addTableRowEvent('export', function (obj) { |
|
|
|
metaListTable.addTableRowEvent('export', function (obj) { |
|
|
|
if (id === DIR_ROOT_ID) { |
|
|
|
if (id === DIR_ROOT_ID) { |
|
|
|
showErrorMsg('不允许导出根目录数据'); |
|
|
|
showErrorMsg('不允许导出根目录数据'); |
|
|
|