|  | @@ -8,7 +8,33 @@
 | 
	
		
			
				|  |  |   * @version
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +const showTools = 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 {
 | 
	
		
			
				|  |  | +        right.hide();
 | 
	
		
			
				|  |  | +        left.css('width', '100%');
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  $(document).ready(() => {
 | 
	
		
			
				|  |  | +    showTools(true);
 | 
	
		
			
				|  |  |      autoFlashHeight();
 | 
	
		
			
				|  |  |      const gclSpread = SpreadJsObj.createNewSpread($('#gcl-spread')[0]);
 | 
	
		
			
				|  |  |      const gclSpreadSetting = {
 | 
	
	
		
			
				|  | @@ -161,33 +187,9 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |      $('#compare-tag').click(() => {
 | 
	
		
			
				|  |  |          SpreadJsObj.reLoadSheetData(gclSheet);
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      // 展开收起附件
 | 
	
		
			
				|  |  |      $('a', '.right-nav').bind('click', function () {
 | 
	
		
			
				|  |  |          const tab = $(this), tabPanel = $(tab.attr('content'));
 | 
	
		
			
				|  |  | -        const showTools = 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 {
 | 
	
		
			
				|  |  | -                right.hide();
 | 
	
		
			
				|  |  | -                left.css('width', '100%');
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        };
 | 
	
		
			
				|  |  |          if (!tab.hasClass('active')) {
 | 
	
		
			
				|  |  |              $('a', '.side-menu').removeClass('active');
 | 
	
		
			
				|  |  |              $('.tab-content .tab-select-show').removeClass('active');
 |