|  | @@ -1,31 +1,8 @@
 | 
	
		
			
				|  |  | -const showSideTools = function (show) {
 | 
	
		
			
				|  |  | -    const left = $('#left-view'), right = $('#right-view'), parent = left.parent();
 | 
	
		
			
				|  |  | -    if (show) {
 | 
	
		
			
				|  |  | -        right.show();
 | 
	
		
			
				|  |  | -        autoFlashHeight();
 | 
	
		
			
				|  |  | -        /**
 | 
	
		
			
				|  |  | -         * right.show()后, parent被撑开成2倍left.height, 导致parent.width减少了10px
 | 
	
		
			
				|  |  | -         * 第一次left.width调整后,parent的缩回left.height, 此时parent.width又增加了10px
 | 
	
		
			
				|  |  | -         * 故需要通过最终的parent.width再计算一次left.width
 | 
	
		
			
				|  |  | -         *
 | 
	
		
			
				|  |  | -         * Q: 为什么不通过先计算left.width的宽度,以避免计算两次left.width?
 | 
	
		
			
				|  |  | -         * A: 右侧工具栏不一定显示,当右侧工具栏显示过一次后,就必须使用parent和right来计算left.width
 | 
	
		
			
				|  |  | -         *
 | 
	
		
			
				|  |  | -         */
 | 
	
		
			
				|  |  | -            //left.css('width', parent.width() - right.outerWidth());
 | 
	
		
			
				|  |  | -            //left.css('width', parent.width() - right.outerWidth());
 | 
	
		
			
				|  |  | -        const percent = 100 - right.outerWidth() /parent.width() * 100;
 | 
	
		
			
				|  |  | -        left.css('width', percent + '%');
 | 
	
		
			
				|  |  | -    } else {
 | 
	
		
			
				|  |  | -        left.width(parent.width());
 | 
	
		
			
				|  |  | -        right.hide();
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -};
 | 
	
		
			
				|  |  |  const progressCombo = [{ text: '', value: '' }, { text: '进行中', value: '进行中' }, { text: '已完成', value: '已完成' }];
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  $(document).ready(() => {
 | 
	
		
			
				|  |  |      autoFlashHeight();
 | 
	
		
			
				|  |  | -    let datepicker;
 | 
	
		
			
				|  |  | +    let datepicker, fileReference;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      class ProgressObj {
 | 
	
		
			
				|  |  |          constructor() {
 | 
	
	
		
			
				|  | @@ -547,6 +524,44 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |              tabPanel.addClass('active');
 | 
	
		
			
				|  |  |              // $('.tab-content .tab-pane').removeClass('active');
 | 
	
		
			
				|  |  |              showSideTools(tab.hasClass('active'));
 | 
	
		
			
				|  |  | +            if (tab.attr('content') === '#reference') {
 | 
	
		
			
				|  |  | +                if (!fileReference) {
 | 
	
		
			
				|  |  | +                    fileReference = $.stdLib({
 | 
	
		
			
				|  |  | +                        selector: '#reference',
 | 
	
		
			
				|  |  | +                        stdType: 'reference',
 | 
	
		
			
				|  |  | +                        libs: fileReferenceList,
 | 
	
		
			
				|  |  | +                        treeSetting: {
 | 
	
		
			
				|  |  | +                            id: 'template_id',
 | 
	
		
			
				|  |  | +                            pid: 'pid',
 | 
	
		
			
				|  |  | +                            order: 'order',
 | 
	
		
			
				|  |  | +                            level: 'level',
 | 
	
		
			
				|  |  | +                            rootId: -1,
 | 
	
		
			
				|  |  | +                            keys: ['id', 'list_id', 'template_id'],
 | 
	
		
			
				|  |  | +                        },
 | 
	
		
			
				|  |  | +                        spreadSetting: {
 | 
	
		
			
				|  |  | +                            cols: [
 | 
	
		
			
				|  |  | +                                {title: '名称', field: 'name', hAlign: 0, width: 420, formatter: '@', cellType: 'tree', wordWrap: true},
 | 
	
		
			
				|  |  | +                                {title: '备注', field: 'remark', hAlign: 1, width: 150, formatter: '@'}
 | 
	
		
			
				|  |  | +                            ],
 | 
	
		
			
				|  |  | +                            emptyRows: 0,
 | 
	
		
			
				|  |  | +                            headRows: 1,
 | 
	
		
			
				|  |  | +                            headRowHeight: [32],
 | 
	
		
			
				|  |  | +                            defaultRowHeight: 21,
 | 
	
		
			
				|  |  | +                            headerFont: '12px 微软雅黑',
 | 
	
		
			
				|  |  | +                            font: '12px 微软雅黑',
 | 
	
		
			
				|  |  | +                            headColWidth: [30],
 | 
	
		
			
				|  |  | +                            selectedBackColor: '#fffacd',
 | 
	
		
			
				|  |  | +                            readOnly: true,
 | 
	
		
			
				|  |  | +                            localCache: {
 | 
	
		
			
				|  |  | +                                key: 'info_progress_reference',
 | 
	
		
			
				|  |  | +                                colWidth: true,
 | 
	
		
			
				|  |  | +                            },
 | 
	
		
			
				|  |  | +                        },
 | 
	
		
			
				|  |  | +                        page: 'ledger',
 | 
	
		
			
				|  |  | +                    });
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                fileReference.spread.refresh();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          } else { // 收起工具栏
 | 
	
		
			
				|  |  |              tab.removeClass('active');
 | 
	
		
			
				|  |  |              tabPanel.removeClass('active');
 | 
	
	
		
			
				|  | @@ -569,6 +584,7 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |          select: '#right-spr',
 | 
	
		
			
				|  |  |          callback: function () {
 | 
	
		
			
				|  |  |              progressObj.spread.refresh();
 | 
	
		
			
				|  |  | +            if (fileReference) fileReference.spread.refresh();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      // 导航Menu
 |