|
@@ -1,7 +1,5 @@
|
|
|
$(document).ready(function() {
|
|
|
autoFlashHeight();
|
|
|
- console.log($(".sjs-height-0").height());
|
|
|
- console.log($('#add-slibing').parent().parent().height());
|
|
|
$('#filing').height($(".sjs-height-0").height() - $('#add-slibing').parent().parent().height() - 10);
|
|
|
class FilingObj {
|
|
|
constructor(setting) {
|
|
@@ -182,8 +180,8 @@ $(document).ready(function() {
|
|
|
toastr.error('未选择上传文件。');
|
|
|
return false;
|
|
|
}
|
|
|
- if (file.size > 30 * 1024 * 1024) {
|
|
|
- toastr.error('上传文件大小超过30MB。');
|
|
|
+ if (file.size > 50 * 1024 * 1024) {
|
|
|
+ toastr.error('上传文件大小超过50MB。');
|
|
|
return false;
|
|
|
}
|
|
|
const fileext = '.' + file.name.toLowerCase().split('.').splice(-1)[0];
|
|
@@ -292,6 +290,21 @@ $(document).ready(function() {
|
|
|
}
|
|
|
setLocalCache(this.expandKey, this.expandCache.join(','));
|
|
|
}
|
|
|
+ expandByLevel(level) {
|
|
|
+ this.expandByCustom(x => {
|
|
|
+ return x.level + 1 < level;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ expandByCustom(fun) {
|
|
|
+ this.expandCache = [];
|
|
|
+ const nodes = this.filingTree.getNodes();
|
|
|
+ for (const node of nodes) {
|
|
|
+ const expand = fun(node);
|
|
|
+ if (expand) this.expandCache.push(node.id);
|
|
|
+ this.filingTree.expandNode(node, expand, false, false);
|
|
|
+ }
|
|
|
+ setLocalCache(this.expandKey, this.expandCache.join(','));
|
|
|
+ }
|
|
|
moveFiling(node, tree_order) {
|
|
|
if (tree_order === node.source_node.tree_order) return;
|
|
|
|
|
@@ -986,4 +999,26 @@ $(document).ready(function() {
|
|
|
modal: '#filing-permission',
|
|
|
list: '#filing-valid',
|
|
|
});
|
|
|
+
|
|
|
+ // 显示层次
|
|
|
+ (function (select) {
|
|
|
+ $(select).click(function () {
|
|
|
+ const tag = $(this).attr('tag');
|
|
|
+ setTimeout(() => {
|
|
|
+ showWaitingView();
|
|
|
+ switch (tag) {
|
|
|
+ case "1":
|
|
|
+ case "2":
|
|
|
+ case "3":
|
|
|
+ case "4":
|
|
|
+ filingObj.expandByLevel(parseInt(tag));
|
|
|
+ break;
|
|
|
+ case "last":
|
|
|
+ filingObj.expandByCustom(() => { return true; });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ closeWaitingView();
|
|
|
+ }, 100);
|
|
|
+ });
|
|
|
+ })('a[name=showLevel]');
|
|
|
});
|