|
|
|
@ -18,7 +18,7 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
|
|
|
|
|
|
let metaListTable, dirFileTable, tagSelector, tags = [], conditions = []; |
|
|
|
|
const unchecked_tags = new Set(); |
|
|
|
|
// 初始化
|
|
|
|
|
// 初始化
|
|
|
|
|
initDirectoryTree(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -144,17 +144,18 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
|
limit: 30, |
|
|
|
|
cols: [[ |
|
|
|
|
{field: 'id', title: 'ID', 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: '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 || '',sort: true |
|
|
|
|
templet: (data) => DICT.getText("data_source", data.dataSource) || data.dataSource || '', |
|
|
|
|
sort: true |
|
|
|
|
}, |
|
|
|
|
{field: 'taskTime', title: '任务时间', width: 180, align: 'center',sort: true}, |
|
|
|
|
{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'} |
|
|
|
|
]], |
|
|
|
@ -173,13 +174,13 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
metaListTable.gtable.on('sort', function(data){ |
|
|
|
|
metaListTable.gtable.on('sort', function (data) { |
|
|
|
|
const {field, type} = data; |
|
|
|
|
let sort = type; |
|
|
|
|
if(!sort || sort === 'null'){ |
|
|
|
|
if (!sort || sort === 'null') { |
|
|
|
|
sort = undefined; |
|
|
|
|
} |
|
|
|
|
metaListTable.where.sort={field: field.trim(), sort: sort} |
|
|
|
|
metaListTable.where.sort = {field: field.trim(), sort: sort} |
|
|
|
|
beginSearch(); |
|
|
|
|
}) |
|
|
|
|
metaListTable.addTableRowEvent('export', function (obj) { |
|
|
|
@ -229,32 +230,39 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
|
url: `${ctx}/search/full/file?metaId=${id}`, |
|
|
|
|
height: 'full-110', |
|
|
|
|
request: {pageName: 'page', limitName: 'size'}, |
|
|
|
|
autoSort: false, |
|
|
|
|
limit: 30, |
|
|
|
|
method: 'get', |
|
|
|
|
cols: [[ |
|
|
|
|
{field: 'id', title: 'ID', hide: true}, |
|
|
|
|
{field: 'fileName', title: '文件名称', minWidth: 300, fixed: 'left'}, |
|
|
|
|
{ |
|
|
|
|
field: 'source', |
|
|
|
|
title: '文件来源', |
|
|
|
|
minWidth: 160, |
|
|
|
|
sort: true, |
|
|
|
|
templet: data => DICT.getText('data_source', data.source) || data.source || '' |
|
|
|
|
}, |
|
|
|
|
{field: 'taskCode', title: '任务代号', minWidth: 160}, |
|
|
|
|
{field: 'taskCode', title: '任务代号', sort: true, minWidth: 160}, |
|
|
|
|
{ |
|
|
|
|
field: 'taskNature', |
|
|
|
|
title: '任务性质', |
|
|
|
|
minWidth: 160, |
|
|
|
|
sort: true, |
|
|
|
|
templet: data => DICT.getText('task_nature', data.taskNature) || data.taskNature || '' |
|
|
|
|
}, |
|
|
|
|
{field: 'troopCode', title: '部队代号', minWidth: 160}, |
|
|
|
|
{field: 'missileNumber', title: '导弹编号', minWidth: 160}, |
|
|
|
|
{field: 'equipmentModel', title: '装备型号', minWidth: 160}, |
|
|
|
|
{field: 'troopCode', title: '部队代号', sort: true, minWidth: 160}, |
|
|
|
|
{field: 'missileNumber', title: '导弹编号', sort: true, minWidth: 160}, |
|
|
|
|
{field: 'equipmentModel', title: '装备型号', sort: true, minWidth: 160}, |
|
|
|
|
{ |
|
|
|
|
field: 'targetNumber', |
|
|
|
|
title: '目标/靶标类型', |
|
|
|
|
minWidth: 160, |
|
|
|
|
sort: true, |
|
|
|
|
templet: data => DICT.getText('target_type', data.targetNumber) || data.targetNumber || '' |
|
|
|
|
}, |
|
|
|
|
{field: 'entryStaff', title: '录入人员', minWidth: 160}, |
|
|
|
|
{field: 'inputDate', title: '收文时间', width: 160, align: 'center'}, |
|
|
|
|
{field: 'entryStaff', title: '录入人员', sort: true, minWidth: 160}, |
|
|
|
|
{field: 'inputDate', title: '收文时间', sort: true, width: 160, align: 'center'}, |
|
|
|
|
{field: 'remark', title: '文件描述', width: 300}, |
|
|
|
|
{field: 'text', title: '文件内容', width: 300}, |
|
|
|
|
{fixed: 'right', title: '操作', toolbar: '#fileRowToolBar', width: 100, align: 'center'} |
|
|
|
@ -262,6 +270,17 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
dirFileTable.gtable.on('sort', function (data) { |
|
|
|
|
const {field, type} = data; |
|
|
|
|
let sort = type; |
|
|
|
|
if (!sort || sort === 'null') { |
|
|
|
|
sort = undefined; |
|
|
|
|
} |
|
|
|
|
dirFileTable.table.where.field = field.trim(); |
|
|
|
|
dirFileTable.table.where.sort = sort; |
|
|
|
|
dirFileTable.reloadTable({table: dirFileTable.table}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// 查看按钮监听
|
|
|
|
|
dirFileTable.addTableRowEvent('details-file', function (obj) { |
|
|
|
|
openMaxLayerWithURL(`${ctx}/sys/file/view?fileId=${obj.id}`) |
|
|
|
@ -305,7 +324,7 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
|
// 监听条件标签删除事件
|
|
|
|
|
element.on('tabDelete(condition-tab)', function (data) { |
|
|
|
|
let key = $(this).parent().data('key'); |
|
|
|
|
if(key === 'markTag'){ |
|
|
|
|
if (key === 'markTag') { |
|
|
|
|
tags = []; |
|
|
|
|
} |
|
|
|
|
let formVal = form.val('search-form'); |
|
|
|
@ -427,7 +446,7 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
|
} |
|
|
|
|
tag_htm += `<input type="checkbox" title="${tag.title}" value="${tag.id}" ${checked} lay-skin="primary">`; |
|
|
|
|
} |
|
|
|
|
if (tag_htm){ |
|
|
|
|
if (tag_htm) { |
|
|
|
|
htm += `<li data-key="markTag">置标标签:${tag_htm}</li>`; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -438,9 +457,9 @@ layui.use(['layer', 'listPage', 'globalTree', 'gtable', 'form', 'element', 'drop |
|
|
|
|
|
|
|
|
|
$('li[data-key="markTag"] .layui-form-checkbox').on('click', function () { |
|
|
|
|
let val = $(this).prev().val(); |
|
|
|
|
if(unchecked_tags.has(val)){ |
|
|
|
|
if (unchecked_tags.has(val)) { |
|
|
|
|
unchecked_tags.delete(val); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
unchecked_tags.add(val); |
|
|
|
|
} |
|
|
|
|
beginSearch(); |
|
|
|
|