portal html css js resource

cmp-workspaces.js 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. $(document).ready(function() {
  2. var id = $.cookie("userid");
  3. console.log(id);
  4. /*企业信息*/
  5. function companyInformation() {
  6. $.ajax({
  7. url: "/ajax/org/" + id,
  8. type: "GET",
  9. timeout: 10000,
  10. dataType: "json",
  11. beforeSend: function() {},
  12. success: function(data, textState) {
  13. if(data.success) {
  14. var $data = data.data;
  15. console.log(data);
  16. if($data.authStatus!=3){
  17. $("#photoClass").addClass("authicon-com-no")
  18. $("#authOk").hide();
  19. }else{
  20. $("#photoClass").addClass("authicon-com-ok")
  21. $("#authBad").hide();
  22. }
  23. $(".h1Font").find("span").text($data.name);
  24. if($data.hasOrgLogo) {
  25. $("#oimg").attr("src", "/images/org/" + $data.id + ".jpg");
  26. } else {
  27. $("#oimg").attr("src", "../images/default-icon.jpg");
  28. }
  29. if($data.orgUrl) {
  30. $("#inteAddress").val($data.orgUrl);
  31. }
  32. if($data.foundTime) {
  33. var oTime = timeGeshi($data.foundTime);
  34. $("#createTime").text(oTime);
  35. }
  36. if($data.city) {
  37. $("#ocity").text($data.city);
  38. }
  39. if($data.orgSize) {
  40. switch($data.orgSize) {
  41. case '1':
  42. $("#qualificationList").text("50人以内")
  43. break;
  44. case '2':
  45. $("#qualificationList").text("50-100人")
  46. break;
  47. case '3':
  48. $("#qualificationList").text("100-200人")
  49. break;
  50. case '4':
  51. $("#qualificationList").text("200-500人")
  52. break;
  53. case '5':
  54. $("#qualificationList").text("500-1000人")
  55. break;
  56. default:
  57. $("#qualificationList").text("1000人以上")
  58. break;
  59. }
  60. }
  61. if($data.orgType) {
  62. switch($data.orgType) {
  63. case '2':
  64. $("#orgType").text("国有企业");
  65. break;
  66. case '3':
  67. $("#orgType").text("上市企业");
  68. break;
  69. case '4':
  70. $("#orgType").text("合资企业");
  71. break;
  72. case '5':
  73. $("#orgType").text("私人企业");
  74. break;
  75. case '6':
  76. $("#orgType").text("外资企业");
  77. break;
  78. default:
  79. $("#orgType").text("初创企业");
  80. break;
  81. }
  82. }
  83. }
  84. },
  85. error: function(XMLHttpRequest, textStats, errorThrown) {
  86. $.MsgBox.Alert('提示', '服务器请求失败')
  87. }
  88. })
  89. }
  90. /*时间格式转换*/
  91. function timeGeshi(otm) {
  92. var otme = otm.substring(0, 4) + "-" + otm.substring(4, 6) + "-" + otm.substring(6, 8);
  93. return otme;
  94. }
  95. companyInformation()
  96. })