|
|
|
@ -134,6 +134,7 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
|
url: `${ctx}/search/metadata/all/page/${id}`, |
|
|
|
|
height: 'full-110', |
|
|
|
|
method: 'post', |
|
|
|
|
autoSort: false, |
|
|
|
|
defaultToolbar: [{ |
|
|
|
|
title: '导出' //标题
|
|
|
|
|
, layEvent: 'export' //事件名,用于 toolbar 事件中使用
|
|
|
|
@ -143,17 +144,17 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
|
limit: 30, |
|
|
|
|
cols: [[ |
|
|
|
|
{field: 'id', title: 'ID', hide: true}, |
|
|
|
|
{field: 'resourceName', title: '数据名称', width: 300}, |
|
|
|
|
{field: 'resourceComment', title: '中文注释/描述'}, |
|
|
|
|
{field: 'directoryPath', title: '资源路径'}, |
|
|
|
|
{field: 'themeTask', title: '主题任务', hide: true}, |
|
|
|
|
{field: 'resourceName', title: '数据名称', width: 300,sort: true}, |
|
|
|
|
{field: 'resourceComment', title: '中文注释/描述',sort: true}, |
|
|
|
|
{field: 'directoryPath', title: '资源路径',sort: true}, |
|
|
|
|
{field: 'themeTask', title: '主题任务', hide: true,sort: true}, |
|
|
|
|
{ |
|
|
|
|
field: 'dataSource', |
|
|
|
|
title: '数据来源', |
|
|
|
|
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}, |
|
|
|
|
{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) { |
|
|
|
|
if (id === DIR_ROOT_ID) { |
|
|
|
|
showErrorMsg('不允许导出根目录数据'); |
|
|
|
|