|
@@ -37,6 +37,10 @@ $(document).ready(function() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ refreshFileCountHint() {
|
|
|
+ const sum = _.sum(this.dragTree.children.map(x => { return x.file_count}));
|
|
|
+ $('#file-count').html(`文件总数:${sum}`);
|
|
|
+ }
|
|
|
calcTotalFileCount() {
|
|
|
this.dragTree.recursiveFun(this.dragTree.children, x => {
|
|
|
if (x.children && x.children.length > 0) {
|
|
@@ -89,6 +93,7 @@ $(document).ready(function() {
|
|
|
this.dragTree.loadDatas(data);
|
|
|
this.calcTotalFileCount();
|
|
|
this.loadFiling();
|
|
|
+ this.refreshFileCountHint();
|
|
|
}
|
|
|
_getFileNameHtml(file) {
|
|
|
const moveHtml = file.canEdit ? `<a href="javascript: void(0);" class="mr-1" name="move-file" fid="${file.id}"><i class="fa fa-exchange fa-fw"></i></a>` : '';
|
|
@@ -265,6 +270,7 @@ $(document).ready(function() {
|
|
|
filingObj.curFiling.source_node.files.unshift(...data.files);
|
|
|
filingObj.refreshPages();
|
|
|
filingObj.refreshFilesTable();
|
|
|
+ filingObj.refreshFileCountHint();
|
|
|
if (callback) callback();
|
|
|
});
|
|
|
}
|
|
@@ -285,6 +291,7 @@ $(document).ready(function() {
|
|
|
filingObj.updateFilingFileCount(filingObj.curFiling, result.filing.file_count);
|
|
|
filingObj.refreshPages();
|
|
|
filingObj.refreshFilesTable();
|
|
|
+ filingObj.refreshFileCountHint();
|
|
|
if (callback) callback();
|
|
|
});
|
|
|
|
|
@@ -303,6 +310,7 @@ $(document).ready(function() {
|
|
|
if (data.filing.id === filingObj.curFiling.source_node.id) {
|
|
|
filingObj.refreshPages();
|
|
|
filingObj.refreshFilesTable();
|
|
|
+ filingObj.refreshFileCountHint();
|
|
|
}
|
|
|
if (callback) callback();
|
|
|
});
|
|
@@ -327,6 +335,7 @@ $(document).ready(function() {
|
|
|
filingObj.curFiling.source_node.files.unshift(...data.files);
|
|
|
filingObj.updateFilingFileCount(filingObj.curFiling, data.filing.file_count);
|
|
|
filingObj.refreshFilesTable();
|
|
|
+ filingObj.refreshFileCountHint();
|
|
|
filingObj.refreshPages();
|
|
|
if (callback) callback();
|
|
|
});
|