portal html css js resource

companybrowinfor.js 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. $(document).ready(function() {
  2. //var id = "05FBD2E6F568461CA7EC378E66C47ABE";
  3. var id="BB8EE2EC6881419DACC5AF4FE650055A";
  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. console.log(data);
  15. var $data = data.data;
  16. $(".h1Font").text($data.name);
  17. if($data.hasOrgLogo) {
  18. $("#oimg").attr("src", "/images/org/" + $data.id + ".jpg");
  19. }
  20. if($data.orgUrl) {
  21. $("#inteAddress").text($data.orgUrl);
  22. } else {
  23. $("#inteAddress").text("");
  24. }
  25. if($data.foundTime) {
  26. var oTime = timeGeshi($data.foundTime);
  27. $("#createTime").text(oTime);
  28. } else {
  29. $("#createTime").val("");
  30. }
  31. if($data.city) {
  32. $("#ocity").text($data.city);
  33. }
  34. if($data.descp) {
  35. $(".editbox").text($data.descp);
  36. }
  37. if($data.orgSize) {
  38. switch($data.orgSize) {
  39. case '1':
  40. $("#qualificationList").text("50人以内")
  41. break;
  42. case '2':
  43. $("#qualificationList").text("50-100人")
  44. break;
  45. case '3':
  46. $("#qualificationList").text("100-200人")
  47. break;
  48. case '4':
  49. $("#qualificationList").text("200-500人")
  50. break;
  51. case '5':
  52. $("#qualificationList").text("500-1000人")
  53. break;
  54. default:
  55. $("#qualificationList").text("1000人以上")
  56. break;
  57. }
  58. }
  59. if($data.orgType) {
  60. switch($data.orgType) {
  61. case '2':
  62. $("#orgType").text("国有企业");
  63. break;
  64. case '3':
  65. $("#orgType").text("上市企业");
  66. break;
  67. case '4':
  68. $("#orgType").text("合资企业");
  69. break;
  70. case '5':
  71. $("#orgType").text("私人企业");
  72. break;
  73. case '6':
  74. $("#orgType").text("外资企业");
  75. break;
  76. default:
  77. $("#orgType").text("初创企业");
  78. break;
  79. }
  80. }
  81. if($data.industry) {
  82. indu($data.industry, '#industryShow')
  83. }
  84. if($data.subject) {
  85. indu($data.subject, '#subjectShow')
  86. }
  87. if($data.qualification) {
  88. indu($data.qualification, '#qiye ')
  89. }
  90. }
  91. },
  92. error: function(XMLHttpRequest, textStats, errorThrown) {
  93. console.log(XMLHttpRequest)
  94. }
  95. })
  96. }
  97. companyInformation();
  98. function timeGeshi(otm) {
  99. var otme = otm.substring(0, 4) + "-" + otm.substring(4, 6) + "-" + otm.substring(6, 8);
  100. return otme;
  101. }
  102. /*应用行业及领域及企业纸质*/
  103. function indu(oString, oSelector) {
  104. var arr = oString.split(",");
  105. var oArr = new Array();
  106. var i;
  107. for(i in arr) {
  108. if(oSelector == "#subjectShow") {
  109. oArr.push('<div class="acad">' + arr[i] + '</div>');
  110. } else {
  111. oArr.push('<li>' + arr[i] + '</li>');
  112. }
  113. }
  114. $(oSelector).html(oArr.join(""));
  115. }
  116. /*获取所有的企业用户*/
  117. function companyUser() {
  118. $.ajax({
  119. url: "/ajax/professor/qaOrgAuth",
  120. type: "GET",
  121. timeout: 10000,
  122. dataType: "json",
  123. data: {
  124. "orgId": id,
  125. },
  126. beforeSend: function() {},
  127. success: function(data, textState) {
  128. if(data.success) {
  129. console.log(data);
  130. var $info=data.data;
  131. userHtml()
  132. }
  133. },
  134. error: function(XMLHttpRequest, textStats, errorThrown) {
  135. $.MsgBox.Alert('提示', '服务器请求失败')
  136. }
  137. })
  138. }
  139. companyUser();
  140. function userHtml(){
  141. }
  142. })