/**
* Created by Mai on 2017/6/21.
*/
var projectInfoObj = {
getFullPathHtml: function (proj) {
let fullPath = [], i, pm = '项目管理', angleRight = '';
if (proj) {
let pathArr = proj.fullPath;
let engName = pathArr[pathArr.length -2] || '',
projectName = pathArr[pathArr.length -3] || '',
folderName = pathArr[pathArr.length -4] || '';
let newHtml = ` ...
\
...
\
...
\
${proj.name}
${projectReadOnly ?
'(只读)'
: ''}
${projectCooperate ?
'(协作)'
: ''}`;
fullPath.push(newHtml);
}
return fullPath.join('');
},
showProjectInfo: function (data) {
if (data) {
if(!data.engineeringInfo.billsGuidance_lib || data.engineeringInfo.billsGuidance_lib.length === 0){
$('#stdBillsGuidanceTab').addClass('disabled');
} else {
let billsGuidanceLib = data.engineeringInfo.billsGuidance_lib[0];
// 切换清单子界面的模块:清单指引、清单精灵
BillsSub.switchModule(billsGuidanceLib.type);
}
//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();
}
}
};