project_info.js 928 B

123456789101112131415161718192021222324252627
  1. /**
  2. * Created by Mai on 2017/6/21.
  3. */
  4. var projectInfoObj = {
  5. projectInfo: null,
  6. getFullPathHtml: function (proj) {
  7. var fullPath = [], i, pm = '<a href="/pm">项目管理</a>', angleRight = '<i class="fa fa-angle-right fa-fw"></i>';
  8. fullPath.push(pm);
  9. if (proj && proj.fullFolder) {
  10. for (i = 0; i < proj.fullFolder.length; i++) {
  11. fullPath.push(angleRight, proj.fullFolder[i]);
  12. }
  13. fullPath.push(angleRight, proj.name);
  14. }
  15. return fullPath.join('');
  16. },
  17. showProjectInfo: function (proj) {
  18. var that = this;
  19. CommonAjax.post('/pm/api/getProject', {"user_id": userID, "proj_id": scUrlUtil.GetQueryString('project')}, function (data) {
  20. if (data) {
  21. that.projectInfo = data;
  22. $('#fullpath').html(that.getFullPathHtml(that.projectInfo));
  23. }
  24. });
  25. }
  26. };