/**
* Created by Mai on 2017/6/21.
*/
var projectInfoObj = {
projectInfo: null,
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 (proj) {
var that = this;
CommonAjax.post('/pm/api/getProject', {"user_id": userID, "proj_id": scUrlUtil.GetQueryString('project')}, function (data) {
if (data) {
that.projectInfo = data;
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(that.getFullPathHtml(that.projectInfo));
$("[data-toggle='tooltip']").tooltip();
}
});
}
};