|
@@ -65,6 +65,25 @@
|
|
导出报表
|
|
导出报表
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="panel" <% if (pageShow === null || parseInt(pageShow.showArchive) === 0 || isNaN(parseInt(pageShow.showArchive))) { %> style="display:none" <% } %>>
|
|
|
|
+ <div class="panel-body">
|
|
|
|
+ <div class="btn-group" role="group">
|
|
|
|
+ <button type="button" class="btn btn-outline-primary btn-sm" data-toggle="modal" data-target="#guidang"><i class="fa fa-archive"></i> 归档报表</button>
|
|
|
|
+ <div class="btn-group" role="group">
|
|
|
|
+ <button id="btnGroupDrop1" type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
+ 已归档
|
|
|
|
+ </button>
|
|
|
|
+ <div class="dropdown-menu" aria-labelledby="btnGroupDrop1" style="min-width:112px">
|
|
|
|
+ <a class="dropdown-item" href="#">#1 2021-03-01</a>
|
|
|
|
+ <a class="dropdown-item" href="#">#2 2021-02-28</a>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="panel-foot text-muted">
|
|
|
|
+ 报表归档
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<div class="panel">
|
|
<div class="panel">
|
|
<div class="panel-body">
|
|
<div class="panel-body">
|
|
<div class="btn-group" role="group" aria-label="Button group with nested dropdown">
|
|
<div class="btn-group" role="group" aria-label="Button group with nested dropdown">
|
|
@@ -272,17 +291,20 @@
|
|
|
|
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
let TOP_TREE_NODES = <%- rpt_tpl_data %>;
|
|
let TOP_TREE_NODES = <%- rpt_tpl_data %>;
|
|
- const PAGE_SHOW = {closeWatermark: 0, closeExportPdf: 0, closeExportExcel: 0};
|
|
|
|
|
|
+ const PAGE_SHOW = {closeWatermark: 0, closeExportPdf: 0, closeExportExcel: 0, showArchive: 0};
|
|
<% if (pageShow !== null) { %>
|
|
<% if (pageShow !== null) { %>
|
|
- <% if (parseInt(pageShow.closeWatermark) === 1) { %>
|
|
|
|
- PAGE_SHOW['closeWatermark'] = 1;
|
|
|
|
- <% } %>
|
|
|
|
- <% if (parseInt(pageShow.closeExportPdf) === 1) { %>
|
|
|
|
- PAGE_SHOW['closeExportPdf'] = 1;
|
|
|
|
- <% } %>
|
|
|
|
- <% if (parseInt(pageShow.closeExportExcel) === 1) { %>
|
|
|
|
- PAGE_SHOW['closeExportExcel'] = 1;
|
|
|
|
- <% } %>
|
|
|
|
|
|
+ <% if (parseInt(pageShow.closeWatermark) === 1) { %>
|
|
|
|
+ PAGE_SHOW['closeWatermark'] = 1;
|
|
|
|
+ <% } %>
|
|
|
|
+ <% if (parseInt(pageShow.closeExportPdf) === 1) { %>
|
|
|
|
+ PAGE_SHOW['closeExportPdf'] = 1;
|
|
|
|
+ <% } %>
|
|
|
|
+ <% if (parseInt(pageShow.closeExportExcel) === 1) { %>
|
|
|
|
+ PAGE_SHOW['closeExportExcel'] = 1;
|
|
|
|
+ <% } %>
|
|
|
|
+ <% if (parseInt(pageShow.showArchive) === 1) { %>
|
|
|
|
+ PAGE_SHOW['showArchive'] = 1;
|
|
|
|
+ <% } %>
|
|
<% } %>
|
|
<% } %>
|
|
|
|
|
|
// PAGE_SHOW['closeWatermark'] = 0; //测试用,check in 前要屏蔽
|
|
// PAGE_SHOW['closeWatermark'] = 0; //测试用,check in 前要屏蔽
|
|
@@ -399,26 +421,48 @@
|
|
}
|
|
}
|
|
|
|
|
|
function filterUnchkTplTreeNode(topNode, srcData) {
|
|
function filterUnchkTplTreeNode(topNode, srcData) {
|
|
- for (let rIdx = topNode.items.length - 1; rIdx >= 0; rIdx--) {
|
|
|
|
- if (srcData.indexOf(topNode.items[rIdx].name) < 0) {
|
|
|
|
- //topNode.items.splice(rIdx, 1);
|
|
|
|
- //支持第二层判断
|
|
|
|
- //备注:如果选择了父项,那不用再去判断子项
|
|
|
|
- if (topNode.items[rIdx].items && topNode.items[rIdx].items.length > 0) {
|
|
|
|
- for (let rIdx2 = topNode.items[rIdx].items.length - 1; rIdx2 >= 0; rIdx2--) {
|
|
|
|
- let tName = topNode.items[rIdx].name + FOLDER_SEPERATER + topNode.items[rIdx].items[rIdx2].name;
|
|
|
|
- if (srcData.indexOf(tName) < 0) {
|
|
|
|
- topNode.items[rIdx].items.splice(rIdx2, 1);
|
|
|
|
|
|
+ const _chkAndSpliceItem = function(pNode, pStr) {
|
|
|
|
+ let rst = false;
|
|
|
|
+ if (srcData.indexOf(pStr + pNode.name) < 0) {
|
|
|
|
+ if (pNode.items && pNode.items.length > 0) {
|
|
|
|
+ for (let subIdx = pNode.items.length - 1; subIdx >= 0; subIdx--) {
|
|
|
|
+ if (!_chkAndSpliceItem(pNode.items[subIdx], pStr + pNode.name + FOLDER_SEPERATER)) {
|
|
|
|
+ pNode.items.splice(subIdx, 1);
|
|
|
|
+ } else {
|
|
|
|
+ rst = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- topNode.items.splice(rIdx, 1);
|
|
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ rst = true;
|
|
}
|
|
}
|
|
- if (!topNode.items[rIdx].hasOwnProperty('items') || topNode.items[rIdx].items.length === 0) {
|
|
|
|
|
|
+ return rst;
|
|
|
|
+ };
|
|
|
|
+ for (let rIdx = topNode.items.length - 1; rIdx >= 0; rIdx--) {
|
|
|
|
+ if (!_chkAndSpliceItem(topNode.items[rIdx], '')) {
|
|
topNode.items.splice(rIdx, 1);
|
|
topNode.items.splice(rIdx, 1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+// for (let rIdx = topNode.items.length - 1; rIdx >= 0; rIdx--) {
|
|
|
|
+// if (srcData.indexOf(topNode.items[rIdx].name) < 0) {
|
|
|
|
+// //topNode.items.splice(rIdx, 1);
|
|
|
|
+// //支持第二层判断
|
|
|
|
+// //备注:如果选择了父项,那不用再去判断子项
|
|
|
|
+// if (topNode.items[rIdx].items && topNode.items[rIdx].items.length > 0) {
|
|
|
|
+// for (let rIdx2 = topNode.items[rIdx].items.length - 1; rIdx2 >= 0; rIdx2--) {
|
|
|
|
+// let tName = topNode.items[rIdx].name + FOLDER_SEPERATER + topNode.items[rIdx].items[rIdx2].name;
|
|
|
|
+// if (srcData.indexOf(tName) < 0) {
|
|
|
|
+// topNode.items[rIdx].items.splice(rIdx2, 1);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// } else {
|
|
|
|
+// topNode.items.splice(rIdx, 1);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// if (!topNode.items[rIdx].hasOwnProperty('items') || topNode.items[rIdx].items.length === 0) {
|
|
|
|
+// topNode.items.splice(rIdx, 1);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
}
|
|
}
|
|
|
|
|
|
function buildTplTree() {
|
|
function buildTplTree() {
|