|
|
@ -83,12 +83,16 @@ function startRender() { |
|
|
|
if (!ReadPermisDirIds.includes(basicData.id)) { |
|
|
|
if (!ReadPermisDirIds.includes(basicData.id)) { |
|
|
|
permis.viewPermis = false; |
|
|
|
permis.viewPermis = false; |
|
|
|
} |
|
|
|
} |
|
|
|
let url = `${ctx}/business/metadata/list/directory`, where = {directoryId: basicData.id, allChild: true}; |
|
|
|
let reviewForm = layui.form; |
|
|
|
|
|
|
|
let reviewStatus = 'PASS'; |
|
|
|
|
|
|
|
let url = `${ctx}/business/metadata/list/directory`, where = {directoryId: basicData.id, allChild: true,reviewStatus: reviewStatus}; |
|
|
|
if (!basicData.directoryType) { |
|
|
|
if (!basicData.directoryType) { |
|
|
|
permis = false; |
|
|
|
permis = false; |
|
|
|
url = `${ctx}/data-label/manager/api/view/data/page`; |
|
|
|
url = `${ctx}/data-label/manager/api/view/data/page`; |
|
|
|
where = {id: basicData.id}; |
|
|
|
where = {id: basicData.id}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
metaListTable = listPage.init({ |
|
|
|
metaListTable = listPage.init({ |
|
|
|
table: { |
|
|
|
table: { |
|
|
|
permis: permis, |
|
|
|
permis: permis, |
|
|
@ -141,6 +145,10 @@ function startRender() { |
|
|
|
align: 'center' |
|
|
|
align: 'center' |
|
|
|
} |
|
|
|
} |
|
|
|
]], |
|
|
|
]], |
|
|
|
|
|
|
|
done: function (res) { |
|
|
|
|
|
|
|
reviewForm.val('tableToolForm', {reviewStatus: reviewStatus}) |
|
|
|
|
|
|
|
reviewForm.render('radio', 'tableToolForm'); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
metaListTable.addTableRowEvent('addLink', function (obj) { |
|
|
|
metaListTable.addTableRowEvent('addLink', function (obj) { |
|
|
@ -236,6 +244,57 @@ function startRender() { |
|
|
|
}).catch(() => showErrorMsg()); |
|
|
|
}).catch(() => showErrorMsg()); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reviewForm.on('radio(statusRadio)', function (data) { |
|
|
|
|
|
|
|
reviewStatus = data.value; |
|
|
|
|
|
|
|
let options = { |
|
|
|
|
|
|
|
table: { |
|
|
|
|
|
|
|
where: {directoryId: basicData.id, allChild: true,reviewStatus: reviewStatus} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
metaListTable.reloadTable(options) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 目录整编增加批量提交除功能 |
|
|
|
|
|
|
|
* @param ids |
|
|
|
|
|
|
|
* add 2024/04/11 xiongcl |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
metaListTable.addTableRowEvent('batchCommit', function (obj) { |
|
|
|
|
|
|
|
var table = layui.table, checkStatus = table.checkStatus('dirMetadataTable'), |
|
|
|
|
|
|
|
datas = checkStatus.data || []; |
|
|
|
|
|
|
|
if(datas.length<=0){ |
|
|
|
|
|
|
|
showErrorMsg("请至少选择一条数据!"); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (basicData.reviewStatus === ReviewStatus.PASS) { |
|
|
|
|
|
|
|
addDataConfirm(commitData) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
layer.confirm('是否确定提交该数据?', {}, function (index) { |
|
|
|
|
|
|
|
layer.close(index); |
|
|
|
|
|
|
|
commitData(); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function commitData() { |
|
|
|
|
|
|
|
const ids = datas.map(data => data.directoryId); |
|
|
|
|
|
|
|
let param = { |
|
|
|
|
|
|
|
ids: ids.join(','), |
|
|
|
|
|
|
|
status: ReviewStatus.PASS, |
|
|
|
|
|
|
|
opinion: '', |
|
|
|
|
|
|
|
sendNotice: true, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
$.post(`${ctx}/business/review/directory/file/change`, param, function (res) { |
|
|
|
|
|
|
|
if (res.flag) { |
|
|
|
|
|
|
|
showOkMsg('提交成功'); |
|
|
|
|
|
|
|
refreshPermis().then(() => { |
|
|
|
|
|
|
|
metaListTable.reloadTable(); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
layer.msg('提交失败' + res.msg); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
metaListTable.addTableRowEvent('addFile', function () { |
|
|
|
metaListTable.addTableRowEvent('addFile', function () { |
|
|
|
|
|
|
|
|
|
|
|
upload(basicData, `${ctx}/sys/file/layer/dir?directoryId=${basicData.id}&secretLevel=${basicData.secretLevel}`, function (res) { |
|
|
|
upload(basicData, `${ctx}/sys/file/layer/dir?directoryId=${basicData.id}&secretLevel=${basicData.secretLevel}`, function (res) { |
|
|
|