/**
 * Created by Mai on 2017/6/21.
 */
var projectInfoObj = {
    projectInfo: null,
    getFullPathHtml: function (proj) {
        let fullPath = [], i, pm = '项目管理', angleRight = '';
        // fullPath.push(pm);
        if (proj && proj.fullFolder) {
            /*
            for (i = 0; i < proj.fullFolder.length; i++) {
                if (i <= proj.fullFolder.length - 3) {
                    fullPath.push(angleRight, '');
                } else if (i === proj.fullFolder.length - 2) {
                    // 屏蔽原有代码 不显示中间内容
                    // fullPath.push(angleRight, '' + proj.fullFolder[i] + '');
                } else if (i === proj.fullFolder.length - 1) {
                    // 屏蔽原有代码 不显示中间内容
                    // fullPath.push(angleRight, '' + proj.fullFolder[i] + '');
                }
            }
             */
            fullPath.push(' ' + proj.name + '');
        }
        return fullPath.join('');
    },
    showProjectInfo: function (proj) {
        var that = this;
        CommonAjax.post('/pm/api/getProject', {"user_id": userID, "proj_id": scUrlUtil.GetQueryString('project')}, function (data) {
            if (data) {
                that.projectInfo = data;
                //init decimal
                setDecimal(decimalObj, data.property.decimal);
                billsQuanDecimal.datas = data.property.billsQuantityDecimal || [billsDecimalView.angleDecimal];
                basicInfoView.orgDatas = data.property.basicInformation ? basicInfoView.toViewDatas(data.property.basicInformation) : [];
                projFeatureView.orgDatas = data.property.projectFeature ? projFeatureView.toViewDatas(data.property.projectFeature) : [];
                $('#fullpath').html(that.getFullPathHtml(that.projectInfo));
            }
        });
    }
};