/** * Created by Mai on 2017/6/21. */ var projectInfoObj = { getFullPathHtml: function (proj) { let fullPath = [], i, pm = '项目管理', angleRight = ''; if (proj) { let pathArr = proj.fullPath; let projectName = pathArr[pathArr.length -2] || '', folderName = pathArr[pathArr.length -3] || ''; let newHtml = ` ... \ ... \  ${proj.name} ${projectReadOnly ? '(只读)' : ''} ${projectCooperate ? '(协作)' : ''}`; fullPath.push(newHtml); } return fullPath.join(''); }, showProjectInfo: function (data) { if (data) { //如果是工程量清单项目,则显示导入功能 if (data.property.valuationType === 'ration') { $('#importSpan').show(); } if(!data.engineeringInfo.billsGuidance_lib || data.engineeringInfo.billsGuidance_lib.length === 0){ $('#stdBillsGuidanceTab').addClass('disabled'); } else { //打开预算项目时,右侧“清单规则”显示为“项目表”,打开工程量清单项目时,右侧“清单规则”显示为“清单范本”。 $('#stdBillsGuidanceTab').text(data.property.valuationType === 'bill' ? '项目表' : '清单范本'); } //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(this.getFullPathHtml(data)); $("[data-toggle='tooltip']").tooltip(); if (data.property.valuationType == 'bill'){ $("#tab_tender_price").css('display', 'none'); } else{ $("#about-calc").css('display', 'none'); }; } } };