/**
 * Created by CSL on 2017-09-22.
 * 项目属性之人工系数。
 */
let labourCoeView = {
    datas: [],
    spread: null,

    buildSheet: function (){
        let me = this;
        me.datas = calcLabourCoes;
        if (me.spread) {
            me.spread.destroy();
            me.spread = null;
        };

        me.spread = new GC.Spread.Sheets.Workbook($("#labourCoeSpread")[0], { sheetCount: 1 });
        me.spread.options.tabStripVisible = false;
        me.spread.options.showVerticalScrollbar = false;
        me.spread.options.showHorizontalScrollbar = false;
        let sheetArea = GC.Spread.Sheets.SheetArea;
        let sheet = me.spread.getSheet(0);
        sheet.suspendPaint();
        sheet.suspendEvent();
        sheet.setRowCount(1, sheetArea.colHeader);
        sheet.setColumnCount(4, sheetArea.viewport);
        sheet.setRowHeight(0, 30, sheetArea.colHeader);
        sheet.setRowCount(7);
        sheet.resumeEvent();
        sheet.resumePaint();
    }
};

$(document).ready(function(){
    $("#tab_poj-settings-6").on('shown.bs.tab', function (e) {
        labourCoeView.buildSheet();
    });
});