/** * 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(angleRight, '' + 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; $('#fullpath').html(that.getFullPathHtml(that.projectInfo)); } }); } };